Files
wasmtime/wasmtime-environ/build.rs
Artur Jamro b7d86af0ec Cache directory hierarchy (#217)
* Simple module compilation cache

* Fix base64 encoding bug

* Use warn! everywhere in cache system

* Remove unused import

* Temporary workaround for long path on Windows

* Remove unused import for non-windows builds

* Cache directory hierarchy

* Fix conditional compilation for debug mode

* Minor enhancements
2019-07-26 07:24:58 -07:00

10 lines
300 B
Rust

use std::process::Command;
fn main() {
let git_rev = match Command::new("git").args(&["rev-parse", "HEAD"]).output() {
Ok(output) => String::from_utf8(output.stdout).unwrap(),
Err(_) => String::from("git-not-found"),
};
println!("cargo:rustc-env=GIT_REV={}", git_rev);
}