Files
dcr/src/platform/mod.rs
Dexoron 0f48151b68 Added:
- Modular builders for `gcc`, `clang`, `msvc`
- Platform-specific binary path generation (Linux/macOS/Windows)

Changed:
- Build configuration moved to `[build]` (`language`, `standard`, `compiler`)
- `dcr.toml` formatting now includes the `[build]` section
- Build uses built-in `debug/release` flags per compiler
- Build compiles all `*.c/*.cpp` files in `src/` into a single binary (no incremental build)
- Updated `dcr.toml` examples in documentation
2026-02-21 16:12:20 +08:00

26 lines
603 B
Rust

#[cfg(target_os = "linux")]
pub mod linux;
#[cfg(target_os = "macos")]
pub mod macos;
#[cfg(target_os = "windows")]
pub mod windows;
pub fn bin_path(profile: &str, name: &str) -> String {
#[cfg(target_os = "linux")]
{
linux::bin_path(profile, name)
}
#[cfg(target_os = "macos")]
{
return macos::bin_path(profile, name);
}
#[cfg(target_os = "windows")]
{
return windows::bin_path(profile, name);
}
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
{
format!("./target/{profile}/{name}")
}
}