build.rs

 1fn main() {
 2    // Find WebRTC.framework as a sibling of the executable when running outside of an application bundle.
 3    // TODO: We shouldn't depend on WebRTC in editor
 4    println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
 5
 6    if std::env::var("CARGO_CFG_TARGET_ENV").ok() == Some("msvc".to_string()) {
 7        println!("cargo:rustc-link-arg=/stack:{}", 8 * 1024 * 1024);
 8
 9        let manifest = std::path::Path::new("../zed/resources/windows/manifest.xml");
10        println!("cargo:rerun-if-changed={}", manifest.display());
11        println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");
12
13        println!(
14            "cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
15            manifest.canonicalize().unwrap().display()
16        );
17    }
18}