Files
wasmer/lib/compiler-cranelift/build.rs
Yuri Astrakhan f123f69892 chore: inline format args to improve readability
Using this command, fixed format argument inlining to improve readability, and fix a few minor related styling issues like trailing commas in a single line.

```
cargo clippy --all-targets --workspace --exclude wasmer-cli --exclude wasmer-swift -- -D clippy::uninlined_format_args
```
2025-01-22 12:53:01 -05:00

16 lines
471 B
Rust

//! Wasmer Cranelift compiler build script.
//!
//! Sets the git revsion? for $PURPOSE
//! TODO(syrus): explain what's happening here
use std::process::Command;
use std::str;
fn main() {
let git_rev = match Command::new("git").args(["rev-parse", "HEAD"]).output() {
Ok(output) => str::from_utf8(&output.stdout).unwrap().trim().to_string(),
Err(_) => env!("CARGO_PKG_VERSION").to_string(),
};
println!("cargo:rustc-env=GIT_REV={git_rev}");
}