Make WASI and wat support optional in the C API (#1419)
Add some crate features to compile out support for these features of the C API. Avoiding these two features if they're not necessary shaves about 2MB off the final shared object in some local tests!
This commit is contained in:
@@ -20,12 +20,17 @@ doctest = false
|
||||
anyhow = "1.0"
|
||||
once_cell = "1.3"
|
||||
wasmtime = { path = "../api", default-features = false }
|
||||
wasi-common = { path = "../wasi-common" }
|
||||
wasmtime-wasi = { path = "../wasi" }
|
||||
wasmtime-c-api-macros = { path = "macros" }
|
||||
wat = "1.0"
|
||||
|
||||
# Optional dependency for the `wat2wasm` API
|
||||
wat = { version = "1.0", optional = true }
|
||||
|
||||
# Optional dependencies for the `wasi` feature
|
||||
wasi-common = { path = "../wasi-common", optional = true }
|
||||
wasmtime-wasi = { path = "../wasi", optional = true }
|
||||
|
||||
[features]
|
||||
default = ['jitdump']
|
||||
default = ['jitdump', 'wat', 'wasi']
|
||||
lightbeam = ["wasmtime/lightbeam"]
|
||||
jitdump = ["wasmtime/jitdump"]
|
||||
wasi = ['wasi-common', 'wasmtime-wasi']
|
||||
|
||||
Reference in New Issue
Block a user