mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-24 09:30:46 +01:00
d544470d1d
Follows-up https://github.com/zed-industries/zed/pull/64862 with similar fixes: * replaces a few dependencies that are almost not used, removes unused dependencies * removed unused features * removes `test-support` dependencies from the regular tree * cleans up build scripts Despite the large diff, the changes are rather mechanical, split by commits. Result: <img width="1172" height="77" alt="image" src="https://github.com/user-attachments/assets/7d8aeb58-7cec-4246-8157-d07fc585f81f" /> Release Notes: - N/A - [GPUI] N/A
17 lines
651 B
Rust
17 lines
651 B
Rust
fn main() {
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
let version = std::env::var("CARGO_PKG_VERSION").unwrap();
|
|
let out_dir = std::env::var("OUT_DIR").unwrap();
|
|
|
|
let mut parts = version.split(|c: char| !c.is_ascii_digit());
|
|
let major = parts.next().unwrap().parse::<u16>().unwrap().to_be_bytes();
|
|
let minor = parts.next().unwrap().parse::<u16>().unwrap().to_be_bytes();
|
|
let patch = parts.next().unwrap().parse::<u16>().unwrap().to_be_bytes();
|
|
|
|
std::fs::write(
|
|
std::path::Path::new(&out_dir).join("version_bytes"),
|
|
[major[0], major[1], minor[0], minor[1], patch[0], patch[1]],
|
|
)
|
|
.unwrap();
|
|
}
|