mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
35 lines
415 B
Rust
35 lines
415 B
Rust
#[cxx::bridge]
|
|
mod handle {
|
|
extern "C++" {
|
|
type Job;
|
|
}
|
|
}
|
|
|
|
#[cxx::bridge]
|
|
mod ffi1 {
|
|
extern "C++" {
|
|
type Job;
|
|
}
|
|
|
|
extern "Rust" {
|
|
fn f() -> Vec<Job>;
|
|
}
|
|
}
|
|
|
|
#[cxx::bridge]
|
|
mod ffi2 {
|
|
extern "C++" {
|
|
type Job = crate::handle::Job;
|
|
}
|
|
|
|
extern "Rust" {
|
|
fn f() -> Vec<Job>;
|
|
}
|
|
}
|
|
|
|
fn f() -> Vec<handle::Job> {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn main() {}
|