File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed
crates/cpp/tests/symmetric_async Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ [workspace ]
2+ members = [" sleep" ]
3+ resolver = " 2"
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " sleep"
3+ version = " 0.1.0"
4+ edition = " 2021"
5+
6+ [dependencies ]
7+ symmetric_executor = { version = " 0.1.0" , path = " ../../../../symmetric_executor" }
8+
9+ [lib ]
10+ crate-type = [" cdylib" ]
Original file line number Diff line number Diff line change 1+ use std:: env;
2+
3+ fn main ( ) {
4+ let out = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
5+ println ! (
6+ r"cargo:rustc-link-search={}/../../../deps" ,
7+ out. into_string( ) . unwrap( )
8+ ) ;
9+ }
Original file line number Diff line number Diff line change 1+ #[ link( name = "symmetric_executor" ) ]
2+ extern "C" {
3+ fn symmetricX3AruntimeX2Fsymmetric_executorX400X2E1X2E0X00X5BstaticX5Devent_subscriptionX2Efrom_timeout ( nanoseconds : u64 ) -> * mut ( ) ;
4+ }
5+
6+ #[ no_mangle]
7+ unsafe extern "C" fn async_sleep (
8+ args : * const ( ) ,
9+ _results : * mut ( ) ,
10+ ) -> * mut ( ) {
11+ let nanoseconds = * args. cast :: < u64 > ( ) ;
12+ symmetricX3AruntimeX2Fsymmetric_executorX400X2E1X2E0X00X5BstaticX5Devent_subscriptionX2Efrom_timeout ( nanoseconds)
13+ }
You can’t perform that action at this time.
0 commit comments