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:
25
src/lib.rs
25
src/lib.rs
@@ -99,16 +99,7 @@ use anyhow::{bail, Result};
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use structopt::StructOpt;
|
||||
use wasmtime::{Config, ProfilingStrategy, Strategy};
|
||||
|
||||
fn pick_compilation_strategy(cranelift: bool, lightbeam: bool) -> Result<Strategy> {
|
||||
Ok(match (lightbeam, cranelift) {
|
||||
(true, false) => Strategy::Lightbeam,
|
||||
(false, true) => Strategy::Cranelift,
|
||||
(false, false) => Strategy::Auto,
|
||||
(true, true) => bail!("Can't enable --cranelift and --lightbeam at the same time"),
|
||||
})
|
||||
}
|
||||
use wasmtime::{Config, ProfilingStrategy};
|
||||
|
||||
fn pick_profiling_strategy(jitdump: bool, vtune: bool) -> Result<ProfilingStrategy> {
|
||||
Ok(match (jitdump, vtune) {
|
||||
@@ -155,10 +146,6 @@ struct CommonOptions {
|
||||
#[structopt(long, parse(from_os_str), value_name = "CONFIG_PATH")]
|
||||
config: Option<PathBuf>,
|
||||
|
||||
/// Use Cranelift for all compilation
|
||||
#[structopt(long, conflicts_with = "lightbeam")]
|
||||
cranelift: bool,
|
||||
|
||||
/// Disable logging.
|
||||
#[structopt(long, conflicts_with = "log_to_files")]
|
||||
disable_logging: bool,
|
||||
@@ -215,10 +202,6 @@ struct CommonOptions {
|
||||
#[structopt(long, value_name = "MODULE,MODULE,...", parse(try_from_str = parse_wasi_modules))]
|
||||
wasi_modules: Option<WasiModules>,
|
||||
|
||||
/// Use Lightbeam for all compilation
|
||||
#[structopt(long, conflicts_with = "cranelift")]
|
||||
lightbeam: bool,
|
||||
|
||||
/// Generate jitdump file (supported on --features=profiling build)
|
||||
#[structopt(long, conflicts_with = "vtune")]
|
||||
jitdump: bool,
|
||||
@@ -294,10 +277,8 @@ impl CommonOptions {
|
||||
fn config(&self, target: Option<&str>) -> Result<Config> {
|
||||
let mut config = Config::new();
|
||||
|
||||
// Set the compiler and target before setting any cranelift options,
|
||||
// since the strategy determines which compiler is in use and the target
|
||||
// will reset any target-specific options.
|
||||
config.strategy(pick_compilation_strategy(self.cranelift, self.lightbeam)?)?;
|
||||
// Set the target before setting any cranelift options, since the
|
||||
// target will reset any target-specific options.
|
||||
if let Some(target) = target {
|
||||
config.target(target)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user