You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
332 B
18 lines
332 B
3 years ago
|
#[cxx::bridge]
|
||
|
mod ffi {
|
||
|
unsafe extern "C++" {
|
||
|
include!("cxxtest/src/external/headers/aclass.hpp");
|
||
|
|
||
|
type AClass;
|
||
|
|
||
|
fn new_aclass(value: u32) -> UniquePtr<AClass>;
|
||
|
fn process(&self);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
println!("Hello, world!");
|
||
|
let aclass = ffi::new_aclass(12);
|
||
|
aclass.process();
|
||
|
}
|