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

View File

@@ -56,6 +56,8 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"wasmtime-debug",
"wasmtime-profiling",
"wasmtime-obj",
"wasmtime-cranelift",
"wasmtime-lightbeam",
"wasmtime-jit",
"wasmtime-cache",
"wasmtime",
@@ -298,7 +300,7 @@ fn verify(crates: &[Crate]) {
.arg("--manifest-path")
.arg(&krate.manifest)
.env("CARGO_TARGET_DIR", "./target");
if krate.name == "lightbeam" || krate.name == "witx" {
if krate.name.contains("lightbeam") || krate.name == "witx" {
cmd.arg("--no-verify");
}
let status = cmd.status().unwrap();