27 lines
563 B
Rust
Raw Normal View History

#![feature(format_args_nl)]
2023-06-22 02:23:27 -07:00
use logging::setup_klog;
use rootdir::inject_magisk_rc;
2023-05-24 19:11:56 -07:00
// Has to be pub so all symbols in that crate is included
pub use magiskpolicy;
2022-07-05 21:13:09 -07:00
mod logging;
mod rootdir;
2022-07-05 21:13:09 -07:00
2023-05-23 21:50:13 -07:00
#[cxx::bridge]
pub mod ffi {
#[namespace = "rust"]
2022-07-05 21:13:09 -07:00
extern "Rust" {
fn setup_klog();
fn inject_magisk_rc(fd: i32, tmp_dir: Utf8CStrRef);
}
unsafe extern "C++" {
include!("../base/include/base.hpp");
#[namespace = "rust"]
#[cxx_name = "Utf8CStr"]
type Utf8CStrRef<'a> = base::ffi::Utf8CStrRef<'a>;
2022-07-05 21:13:09 -07:00
}
}