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:
12
crates/cache/tests/cache_write_default_config.rs
vendored
Normal file
12
crates/cache/tests/cache_write_default_config.rs
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
use wasmtime_cache::create_new_config;
|
||||
|
||||
#[test]
|
||||
fn test_cache_write_default_config() {
|
||||
let dir = tempfile::tempdir().expect("Can't create temporary directory");
|
||||
let config_path = dir.path().join("cache-config.toml");
|
||||
|
||||
let result = create_new_config(Some(&config_path));
|
||||
assert!(result.is_ok());
|
||||
assert!(config_path.exists());
|
||||
assert_eq!(config_path, result.unwrap());
|
||||
}
|
||||
Reference in New Issue
Block a user