wasmtime: Extract cranelift/lightbeam compilers to separate crates (#2117)

This commit extracts the two implementations of `Compiler` into two
separate crates, `wasmtime-cranelfit` and `wasmtime-lightbeam`. The
`wasmtime-jit` crate then depends on these two and instantiates them
appropriately. The goal here is to start reducing the weight of the
`wasmtime-environ` crate, which currently serves as a common set of
types between all `wasmtime-*` crates. Long-term I'd like to remove the
dependency on Cranelift from `wasmtime-environ`, but that's going to
take a lot more work.

In the meantime I figure it's a good way to get started by separating
out the lightbeam/cranelift function compilers from the
`wasmtime-environ` crate. We can continue to iterate on moving things
out in the future, too.
This commit is contained in:
Alex Crichton
2020-08-20 04:34:31 -05:00
committed by GitHub
parent b5e24c8c67
commit 693c6ea771
19 changed files with 564 additions and 369 deletions

25
Cargo.lock generated
View File

@@ -2414,6 +2414,17 @@ dependencies = [
"wat",
]
[[package]]
name = "wasmtime-cranelift"
version = "0.19.0"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
"cranelift-wasm",
"wasmtime-environ",
]
[[package]]
name = "wasmtime-debug"
version = "0.19.0"
@@ -2436,11 +2447,9 @@ dependencies = [
"cfg-if",
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
"cranelift-wasm",
"gimli 0.21.0",
"indexmap",
"lightbeam",
"log",
"more-asserts",
"serde",
@@ -2500,14 +2509,26 @@ dependencies = [
"target-lexicon",
"thiserror",
"wasmparser 0.59.0",
"wasmtime-cranelift",
"wasmtime-debug",
"wasmtime-environ",
"wasmtime-lightbeam",
"wasmtime-obj",
"wasmtime-profiling",
"wasmtime-runtime",
"winapi",
]
[[package]]
name = "wasmtime-lightbeam"
version = "0.19.0"
dependencies = [
"cranelift-codegen",
"lightbeam",
"wasmparser 0.59.0",
"wasmtime-environ",
]
[[package]]
name = "wasmtime-obj"
version = "0.19.0"