Restructure the native module

Consolidate all code into the src folder
This commit is contained in:
topjohnwu
2022-07-23 13:51:56 -07:00
parent c7c9fb9576
commit b9e89a1a2d
198 changed files with 52 additions and 45 deletions

25
native/src/base/lib.rs Normal file
View 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();
}
}