Making caching support optional in Wasmtime (#2119)
This commit moves all of the caching support that currently lives in `wasmtime-environ` into a `wasmtime-cache` crate and makes it optional. The goal here is to slim down the `wasmtime-environ` crate and clearly separate boundaries where caching is a standalone and optional feature, not intertwined with other crates.
This commit is contained in:
10
crates/cache/build.rs
vendored
Normal file
10
crates/cache/build.rs
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user