mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
Add packages/cli-rs, an OpenCode client written in Rust on OpenTUI's Rust crates. It is a client only.
11 lines
510 B
Rust
11 lines
510 B
Rust
fn main() {
|
|
// A deeply nested plugin tree can exceed the Windows main thread's default 1 MiB stack in a debug build.
|
|
let stack = 8 << 20;
|
|
match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() {
|
|
Ok("msvc") => println!("cargo:rustc-link-arg-bin=opencode-native=/STACK:{stack}"),
|
|
Ok("gnu") if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") => {
|
|
println!("cargo:rustc-link-arg-bin=opencode-native=-Wl,--stack,{stack}");
|
|
}
|
|
_ => {}
|
|
}
|
|
}
|