From 1be647a279fbc3dbd8d297e73f8cb49d378992d6 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 16 May 2023 02:09:05 -0700 Subject: [PATCH] Put all FFI into same module --- native/src/base/lib.rs | 4 +--- native/src/core/lib.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/native/src/base/lib.rs b/native/src/base/lib.rs index 71d48c896..f1f286c55 100644 --- a/native/src/base/lib.rs +++ b/native/src/base/lib.rs @@ -30,10 +30,8 @@ pub mod ffi { fn set_log_level_state(level: LogLevel, enabled: bool); fn cmdline_logging(); } -} -#[cxx::bridge(namespace = "rust")] -pub mod ffi2 { + #[namespace = "rust"] extern "Rust" { fn xpipe2(fds: &mut [i32; 2], flags: i32) -> i32; fn fd_path(fd: i32, buf: &mut [u8]) -> isize; diff --git a/native/src/core/lib.rs b/native/src/core/lib.rs index 23ed17682..61647e497 100644 --- a/native/src/core/lib.rs +++ b/native/src/core/lib.rs @@ -13,10 +13,8 @@ pub mod ffi { fn magisk_logging(); fn zygisk_logging(); } -} -#[cxx::bridge(namespace = "rust")] -pub mod ffi2 { + #[namespace = "rust"] extern "Rust" { fn daemon_entry(); fn zygisk_entry();