1 unstable release
Uses old Rust 2015
0.0.2 | Jan 25, 2018 |
---|---|
0.0.1 |
|
#4 in #bridging
4KB
50 lines
A library bridging log message to Android NDK log.
Usage
Cargo.toml
[target.'cfg(target_os="android")'.dependencies]
ndk-logger = "*"
Rust entry
#[macro_use]
extern crate log;
#[cfg(target_os="android")]
extern crate ndk_logger;
#[cfg(target_os="android")]
fn init_logger() {
ndk_logger::init().unwrap();
}
#[cfg(not(target_os="android"))]
fn init_logger() {
// init logger for other platform
}
fn main() {
init_logger();
}
Dependencies
~87KB