fork of https://github.com/rustwasm/wasm-pack for the needs of NextGraph.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
wasm-pack/src/cache.rs

15 lines
365 B

//! Getting and configuring wasm-pack's binary cache.
use anyhow::Result;
use binary_install::Cache;
use std::env;
use std::path::Path;
/// Get wasm-pack's binary cache.
pub fn get_wasm_pack_cache() -> Result<Cache> {
if let Ok(path) = env::var("WASM_PACK_CACHE") {
Ok(Cache::at(Path::new(&path)))
} else {
Cache::new("wasm-pack")
}
}