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:
Alex Crichton
2020-08-07 15:42:40 -05:00
committed by GitHub
parent a796d65467
commit 08f9eb1725
21 changed files with 104 additions and 54 deletions

View File

@@ -13,6 +13,7 @@ edition = "2018"
wasmtime-runtime = { path = "../runtime", version = "0.19.0" }
wasmtime-environ = { path = "../environ", version = "0.19.0" }
wasmtime-jit = { path = "../jit", version = "0.19.0" }
wasmtime-cache = { path = "../cache", version = "0.19.0", optional = true }
wasmtime-profiling = { path = "../profiling", version = "0.19.0" }
wasmparser = "0.59.0"
target-lexicon = { version = "0.10.0", default-features = false }
@@ -40,7 +41,7 @@ wasmtime-wasi = { path = "../wasi" }
maintenance = { status = "actively-developed" }
[features]
default = ['wat', 'jitdump', 'parallel-compilation']
default = ['cache', 'wat', 'jitdump', 'parallel-compilation']
# Enables experimental support for the lightbeam codegen backend, an alternative
# to cranelift. Requires Nightly Rust currently, and this is not enabled by
@@ -55,3 +56,6 @@ vtune = ["wasmtime-jit/vtune"]
# Enables parallel compilation of WebAssembly code
parallel-compilation = ["wasmtime-jit/parallel-compilation"]
# Enables support for automatic cache configuration to be enabled in `Config`.
cache = ["wasmtime-cache"]