From 5a94ef9106c0144b7e29c1982220c40bf6c19296 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 23 May 2023 21:50:13 -0700 Subject: [PATCH] Fix init rust code setup --- native/src/init/Cargo.toml | 2 +- native/src/init/lib.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/native/src/init/Cargo.toml b/native/src/init/Cargo.toml index b687b5ebd..43282596a 100644 --- a/native/src/init/Cargo.toml +++ b/native/src/init/Cargo.toml @@ -12,4 +12,4 @@ cxx-gen = { path = "../external/cxx-rs/gen/lib" } [dependencies] base = { path = "../base" } -cxx = "1.0.69" +cxx = { path = "../external/cxx-rs" } diff --git a/native/src/init/lib.rs b/native/src/init/lib.rs index b46572960..6fd10a72c 100644 --- a/native/src/init/lib.rs +++ b/native/src/init/lib.rs @@ -2,8 +2,9 @@ pub use logging::*; mod logging; -#[cxx::bridge(namespace = "rust")] -pub mod ffi2 { +#[cxx::bridge] +pub mod ffi { + #[namespace = "rust"] extern "Rust" { fn setup_klog(); }