Lines Matching refs:rs
49 3. 添加文件main.rs,就可以在Rust侧通过c_ffi实现对C侧的接口调用。注意Rust侧调用的不安全接口需要使用unsafe封装。
97 sources = [ "main.rs" ]
101 crate_root = "main.rs"
114 1. 在Rust侧文件lib.rs里mod ffi写清楚需要调用的C++接口,并将接口包含在extern "Rust"里面,暴露给C++侧使用。
156 2. C++侧将cxx工具转换出来的lib.rs.h包含进来,就可以使用C++侧的接口。
160 #include "build/rust/tests/test_cxx/src/lib.rs.h"
175 3. 添加构建文件BUILD.gn。rust_cxx底层调用CXX工具将lib.rs文件转换成lib.rs.h和lib.rs.cc文件,ohos_rust_static_ffi实现Rust侧源码的编…
182 sources = [ "src/lib.rs" ]
186 sources = [ "src/lib.rs" ]
248 #include "src/main.rs.h"
319 3. main.rs文件,在main.rs文件的ffi里面,通过宏include!将头文件client_blobstore.h引入进来,从而在Rust的main函数里面就可以通过ffi的方式调用C+…
388 4. 添加构建文件BUILD.gn。使用CXX将main.rs转换成lib.rs.h和lib.rs.cc,同时将产物作为test_cxx_rust_staticlib的源码,编译Rust源码main…
394 sources = [ "src/main.rs" ]
412 sources = [ "src/main.rs" ]