From 9ba210cde828338e2592a45500f20554c8ed92ba Mon Sep 17 00:00:00 2001 From: burningtnt Date: Sat, 7 Mar 2026 13:30:27 +0800 Subject: [PATCH] #![cfg()] for main.rs and lib.rs --- Cargo.toml | 8 +++++--- src/lib.rs | 3 +-- src/main.rs | 8 +------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 170692b..1347269 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,12 +78,14 @@ path = "src/main.rs" [profile.dev] panic = "abort" - -[profile.dev-fast] -inherits = "dev" debug = false strip = "debuginfo" +[profile.dev-slow] +inherits = "dev" +debug = true +strip = "none" + [profile.release] opt-level = "z" strip = true diff --git a/src/lib.rs b/src/lib.rs index 2398829..c05a357 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,10 +7,9 @@ internal_output_capture, string_from_utf8_lossy_owned )] +#![cfg(target_os = "android")] extern crate core; -#[cfg(not(target_os = "android"))] -compile_error!("Terracotta Library is intended for Android platform."); #[macro_export] macro_rules! logging { diff --git a/src/main.rs b/src/main.rs index 1fd7d86..17cb01e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,13 +6,7 @@ #![feature(panic_backtrace_config, const_convert, const_trait_impl)] #![feature(unsafe_cell_access)] -#[cfg(not(any( - target_os = "windows", - target_os = "linux", - target_os = "macos", - target_os = "freebsd" -)))] -compile_error!("Terracotta Executable is intended for Windows, Linux, macos and FreeBSD."); +#![cfg(any(target_os = "windows", target_os = "linux", target_os = "macos", target_os = "freebsd"))] #[macro_export] macro_rules! logging {