wasmtime: add build-time option for parallel compilation (#1903)

When running in embedded environments, threads creation is sometimes
undesirable. This adds a feature to toggle wasmtime's internal thread
creation for parallel compilation.
This commit is contained in:
Daiki Ueno
2020-07-06 18:22:05 +02:00
committed by GitHub
parent 80ff22fd18
commit 2ce2dd0203
6 changed files with 145 additions and 119 deletions

View File

@@ -20,7 +20,7 @@ cranelift-wasm = { path = "../../cranelift/wasm", version = "0.65.0", features =
wasmparser = "0.58.0"
lightbeam = { path = "../lightbeam", optional = true, version = "0.18.0" }
indexmap = "1.0.2"
rayon = "1.2.1"
rayon = { version = "1.2.1", optional = true }
thiserror = "1.0.4"
directories = "2.0.1"
sha2 = "0.8.0"
@@ -32,6 +32,7 @@ zstd = "0.5"
toml = "0.5.5"
file-per-thread-logger = "0.1.1"
more-asserts = "0.2.1"
cfg-if = "0.1.9"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = "0.3.7"
@@ -46,5 +47,8 @@ pretty_env_logger = "0.4.0"
filetime = "0.2.7"
lazy_static = "1.3.0"
[features]
parallel-compilation = ["rayon"]
[badges]
maintenance = { status = "actively-developed" }