Wire hermit_getenv across the engine, rebrand WebUI/systemd/docs, and add apps/desktop (Tauri 2 + React) with a DeepSeek-Harness-like UI. Qt app/ is frozen; full libcstcore FFI is scaffolded behind --features engine. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
1.2 KiB
Rust
30 lines
1.2 KiB
Rust
fn main() {
|
|
// Optional: link a prebuilt libcstcore when HERMIT_CORE_LIB is set.
|
|
// Example:
|
|
// HERMIT_CORE_LIB=/path/to/libcstcore.a HERMIT_CORE_INCLUDE=/path/to/include
|
|
// cargo build --features engine
|
|
if std::env::var("CARGO_FEATURE_ENGINE").is_ok() {
|
|
if let Ok(lib) = std::env::var("HERMIT_CORE_LIB") {
|
|
let path = std::path::PathBuf::from(&lib);
|
|
if let Some(dir) = path.parent() {
|
|
println!("cargo:rustc-link-search=native={}", dir.display());
|
|
}
|
|
let stem = path
|
|
.file_stem()
|
|
.and_then(|s| s.to_str())
|
|
.unwrap_or("cstcore")
|
|
.trim_start_matches("lib");
|
|
println!("cargo:rustc-link-lib=static={}", stem);
|
|
println!("cargo:rustc-link-lib=curl");
|
|
println!("cargo:rustc-link-lib=pthread");
|
|
println!("cargo:rustc-link-lib=m");
|
|
println!("cargo:rerun-if-changed={}", lib);
|
|
}
|
|
if let Ok(inc) = std::env::var("HERMIT_CORE_INCLUDE") {
|
|
println!("cargo:rerun-if-env-changed=HERMIT_CORE_INCLUDE");
|
|
println!("cargo:rustc-env=HERMIT_CORE_INCLUDE={}", inc);
|
|
}
|
|
}
|
|
tauri_build::build()
|
|
}
|