Home
last modified time | relevance | path

Searched refs:c_ffi (Results 1 – 5 of 5) sorted by relevance

/ohos5.0/build/rust/tests/test_bindgen_test/test_for_hpp/
H A Dmain.rs19 mod c_ffi { module
28 const UNINIT: ::std::mem::MaybeUninit<c_ffi::C> = in bindgen_test_layout_C()
33 ::std::mem::size_of::<c_ffi::C>() in bindgen_test_layout_C()
37 ::std::mem::align_of::<c_ffi::C>() in bindgen_test_layout_C()
65 const UNINIT: ::std::mem::MaybeUninit<c_ffi::D> = in bindgen_test_layout_D()
70 ::std::mem::size_of::<c_ffi::D>() in bindgen_test_layout_D()
74 ::std::mem::align_of::<c_ffi::D>() in bindgen_test_layout_D()
81 impl Default for c_ffi::D {
/ohos5.0/build/rust/tests/test_bindgen_test/test_for_h/
H A Dmain.rs19 mod c_ffi { module
27 const UNINIT: ::std::mem::MaybeUninit<c_ffi::Foo2> = ::std::mem::MaybeUninit::uninit(); in bindgen_test_layout_foo()
31 ::std::mem::size_of::<c_ffi::Foo2>() in bindgen_test_layout_foo()
35 ::std::mem::align_of::<c_ffi::Foo2>() in bindgen_test_layout_foo()
42 impl Default for c_ffi::Foo2 {
/ohos5.0/build/rust/tests/test_bindgen_test/test_for_hello_world/
H A Dmain.rs18 mod c_ffi { module
26 unsafe { c_ffi::FuncAAddB(a, b) } in add_two_numbers_in_c()
38 c_ffi::SayHello(c_world); in main()
/ohos5.0/docs/zh-cn/device-dev/subsystems/
H A Dsubsys-build-bindgen-cxx-guide.md49 3. 添加文件main.rs,就可以在Rust侧通过c_ffi实现对C侧的接口调用。注意Rust侧调用的不安全接口需要使用unsafe封装。
54 mod c_ffi {
62 unsafe { c_ffi::FuncAAddB(a, b) }
74 c_ffi::SayHello(c_world);
/ohos5.0/docs/en/device-dev/subsystems/
H A Dsubsys-build-bindgen-cxx-guide.md49 3. Create the **main.rs** file to call C interfaces through c_ffi using Rust. Note that insecure in…
54 mod c_ffi {
62 unsafe { c_ffi::FuncAAddB(a, b) }
74 c_ffi::SayHello(c_world);