Remove the lightbeam backend (#3390)
This commit removes the Lightbeam backend from Wasmtime as per [RFC 14]. This backend hasn't received maintenance in quite some time, and as [RFC 14] indicates this doesn't meet the threshold for keeping the code in-tree, so this commit removes it. A fast "baseline" compiler may still be added in the future. The addition of such a backend should be in line with [RFC 14], though, with the principles we now have for stable releases of Wasmtime. I'll close out Lightbeam-related issues once this is merged. [RFC 14]: https://github.com/bytecodealliance/rfcs/pull/14
This commit is contained in:
@@ -59,9 +59,6 @@ default = ['async', 'cache', 'wat', 'jitdump', 'parallel-compilation', 'cranelif
|
||||
# precompiled WebAssembly modules.
|
||||
cranelift = ["wasmtime-cranelift"]
|
||||
|
||||
# Deprecated, does not actually do anything any more.
|
||||
lightbeam = []
|
||||
|
||||
# Enables support for the `perf` jitdump profiler
|
||||
jitdump = ["wasmtime-jit/jitdump"]
|
||||
|
||||
|
||||
@@ -1333,12 +1333,6 @@ impl Config {
|
||||
fn compiler_builder(strategy: Strategy) -> Result<Box<dyn CompilerBuilder>> {
|
||||
match strategy {
|
||||
Strategy::Auto | Strategy::Cranelift => Ok(wasmtime_cranelift::builder()),
|
||||
#[cfg(feature = "lightbeam")]
|
||||
Strategy::Lightbeam => unimplemented!(),
|
||||
#[cfg(not(feature = "lightbeam"))]
|
||||
Strategy::Lightbeam => {
|
||||
anyhow::bail!("lightbeam compilation strategy wasn't enabled at compile time");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1430,20 +1424,13 @@ pub enum Strategy {
|
||||
/// `wasmtime` crate itself should make the decision about what the best
|
||||
/// code generator for a wasm module is.
|
||||
///
|
||||
/// Currently this always defaults to Cranelift, but the default value will
|
||||
/// Currently this always defaults to Cranelift, but the default value may
|
||||
/// change over time.
|
||||
Auto,
|
||||
|
||||
/// Currently the default backend, Cranelift aims to be a reasonably fast
|
||||
/// code generator which generates high quality machine code.
|
||||
Cranelift,
|
||||
|
||||
/// A single-pass code generator that is faster than Cranelift but doesn't
|
||||
/// produce as high-quality code.
|
||||
///
|
||||
/// To successfully pass this argument to [`Config::strategy`] the
|
||||
/// `lightbeam` feature of this crate must be enabled.
|
||||
Lightbeam,
|
||||
}
|
||||
|
||||
/// Possible optimization levels for the Cranelift codegen backend.
|
||||
|
||||
@@ -805,26 +805,6 @@ mod test {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "lightbeam")]
|
||||
#[test]
|
||||
fn test_compilation_strategy_mismatch() -> Result<()> {
|
||||
let engine = Engine::default();
|
||||
let module = Module::new(&engine, "(module)")?;
|
||||
|
||||
let mut serialized = SerializedModule::new(&module);
|
||||
serialized.metadata.strategy = CompilationStrategy::Lightbeam;
|
||||
|
||||
match serialized.into_module(&engine) {
|
||||
Ok(_) => unreachable!(),
|
||||
Err(e) => assert_eq!(
|
||||
e.to_string(),
|
||||
"Module was compiled with strategy 'Cranelift'",
|
||||
),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_tunables_int_mismatch() -> Result<()> {
|
||||
let engine = Engine::default();
|
||||
|
||||
Reference in New Issue
Block a user