mars-xlog-core 0.1.0

Core runtime building blocks for the Rust-native xlog engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::env;

fn main() {
    let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
    let is_apple = matches!(target_os.as_str(), "ios" | "macos" | "tvos" | "watchos");
    if !is_apple {
        return;
    }

    cc::Build::new()
        .file("src/apple_console_shim.m")
        .flag("-fobjc-arc")
        .compile("xlog_core_apple_console");
    println!("cargo:rustc-link-lib=framework=Foundation");
}