mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Restructure the native module
Consolidate all code into the src folder
This commit is contained in:
25
native/src/base/lib.rs
Normal file
25
native/src/base/lib.rs
Normal file
@ -0,0 +1,25 @@
|
||||
#![feature(format_args_nl)]
|
||||
|
||||
pub use logging::*;
|
||||
pub use misc::*;
|
||||
|
||||
mod logging;
|
||||
mod misc;
|
||||
|
||||
#[cxx::bridge]
|
||||
pub mod ffi {
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum LogLevel {
|
||||
Error,
|
||||
Warn,
|
||||
Info,
|
||||
Debug,
|
||||
}
|
||||
|
||||
extern "Rust" {
|
||||
fn log_with_rs(level: LogLevel, msg: &str);
|
||||
fn exit_on_error(b: bool);
|
||||
fn set_log_level_state(level: LogLevel, enabled: bool);
|
||||
fn cmdline_logging();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user