diff options
| author | ruki <[email protected]> | 2021-11-12 00:54:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-11-12 00:54:54 +0800 |
| commit | 1130f7b98a942da147a92040dd640ce84b561128 (patch) | |
| tree | 9b64d759ec92db638f3d3ed0ad07e6b1283a083b | |
| parent | 147f4005fe0c549244ebddb660964585c5414652 (diff) | |
improve rust test
| -rw-r--r-- | tests/projects/rust/cxx_call_rust_library/src/foo.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/projects/rust/cxx_call_rust_library/src/foo.rs b/tests/projects/rust/cxx_call_rust_library/src/foo.rs index 38727c484..0c4975fa2 100644 --- a/tests/projects/rust/cxx_call_rust_library/src/foo.rs +++ b/tests/projects/rust/cxx_call_rust_library/src/foo.rs @@ -1,3 +1,10 @@ +#[cxx::bridge] +mod foo { + extern "Rust" { + fn add(a: i32, b: i32) -> i32; + } +} + pub fn add(a: i32, b: i32) -> i32 { return a + b; |
