Skip to content

Commit 1ee2af0

Browse files
authored
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]: bytecodealliance/rfcs#14
1 parent 98831fe commit 1ee2af0

39 files changed

Lines changed: 20 additions & 12372 deletions

.github/workflows/main.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ jobs:
131131
# Check some feature combinations of the `wasmtime` crate
132132
- run: cargo check -p wasmtime --no-default-features
133133
- run: cargo check -p wasmtime --no-default-features --features wat
134-
- run: cargo check -p wasmtime --no-default-features --features lightbeam
135134
- run: cargo check -p wasmtime --no-default-features --features jitdump
136135
- run: cargo check -p wasmtime --no-default-features --features vtune
137136
- run: cargo check -p wasmtime --no-default-features --features cache
@@ -307,7 +306,7 @@ jobs:
307306
RUST_BACKTRACE: 1
308307
if: matrix.target == ''
309308

310-
# Build and test all features except for lightbeam
309+
# Build and test all features
311310
- run: ./ci/run-tests.sh --locked
312311
env:
313312
RUST_BACKTRACE: 1
@@ -329,16 +328,6 @@ jobs:
329328
env:
330329
RUST_BACKTRACE: 1
331330
332-
# Build and test lightbeam. Note that
333-
# Lightbeam tests fail right now, but we don't want to block on that.
334-
- run: cargo build --package lightbeam
335-
if: matrix.target != 'aarch64-unknown-linux-gnu' && matrix.target != 's390x-unknown-linux-gnu'
336-
- run: cargo test --package lightbeam
337-
if: matrix.target != 'aarch64-unknown-linux-gnu' && matrix.target != 's390x-unknown-linux-gnu'
338-
continue-on-error: true
339-
env:
340-
RUST_BACKTRACE: 1
341-
342331
# Perform all tests (debug mode) for `wasmtime` with the old x86 backend.
343332
test_x86:
344333
name: Test old x86 backend

Cargo.lock

Lines changed: 0 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,19 @@ members = [
7575
"cranelift",
7676
"crates/bench-api",
7777
"crates/c-api",
78-
"crates/lightbeam/wasmtime",
7978
"crates/misc/run-examples",
8079
"examples/fib-debug/wasm",
8180
"examples/wasi/wasm",
8281
"examples/tokio/wasm",
8382
"fuzz",
8483
]
8584
exclude = [
86-
'crates/wasi-common/WASI/tools/witx-cli',
85+
'crates/wasi-common/WASI/tools/witx-cli',
8786
'docs/rust_wasi_markdown_parser'
8887
]
8988

9089
[features]
9190
default = ["jitdump", "wasmtime/wat", "wasmtime/parallel-compilation", "wasi-nn"]
92-
lightbeam = ["wasmtime/lightbeam"]
9391
jitdump = ["wasmtime/jitdump"]
9492
vtune = ["wasmtime/vtune"]
9593
wasi-crypto = ["wasmtime-wasi-crypto"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Hello, world!
7070
quickly generate high-quality machine code at runtime.
7171

7272
* **Configurable**. Whether you need to precompile your wasm ahead of time,
73-
generate code blazingly fast with Lightbeam, or interpret it at runtime,
74-
Wasmtime has you covered for all your wasm-executing needs.
73+
or interpret it at runtime, Wasmtime has you covered for all your
74+
wasm-executing needs.
7575

7676
* **WASI**. Wasmtime supports a rich set of APIs for interacting with the host
7777
environment through the [WASI standard](https://wasi.dev).

build.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ fn main() -> anyhow::Result<()> {
1717
);
1818
let mut out = String::new();
1919

20-
for strategy in &[
21-
"Cranelift",
22-
#[cfg(feature = "lightbeam")]
23-
"Lightbeam",
24-
] {
20+
for strategy in &["Cranelift"] {
2521
writeln!(out, "#[cfg(test)]")?;
2622
writeln!(out, "#[allow(non_snake_case)]")?;
2723
writeln!(out, "mod {} {{", strategy)?;
@@ -185,14 +181,6 @@ fn write_testsuite_tests(
185181
/// Ignore tests that aren't supported yet.
186182
fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
187183
match strategy {
188-
#[cfg(feature = "lightbeam")]
189-
"Lightbeam" => match (testsuite, testname) {
190-
("simd", _) => return true,
191-
("multi_value", _) => return true,
192-
("reference_types", _) => return true,
193-
("bulk_memory_operations", _) => return true,
194-
_ => (),
195-
},
196184
"Cranelift" => match (testsuite, testname) {
197185
// Skip all reference types tests on the old backend. The modern
198186
// implementation of reference types uses atomic instructions

ci/run-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
cargo test \
44
--features "test-programs/test_programs" \
55
--workspace \
6-
--exclude '*lightbeam*' \
76
--exclude 'wasmtime-wasi-*' \
87
--exclude 'peepmatic*' \
98
--exclude wasi-crypto \

cranelift/codegen/src/isa/x64/inst/emit_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//!
99
//! cd to the top of your wasmtime tree, then:
1010
//! RUST_BACKTRACE=1 cargo test --features test-programs/test_programs \
11-
//! --features experimental_x64 --all --exclude peepmatic --exclude lightbeam \
12-
//! --exclude wasmtime-lightbeam --exclude peepmatic-automata --exclude peepmatic-fuzzing \
11+
//! --features experimental_x64 --all --exclude peepmatic \
12+
//! --exclude peepmatic-automata --exclude peepmatic-fuzzing \
1313
//! --exclude peepmatic-macro --exclude wasmtime-wasi-nn -- isa::x64::inst::emit_tests::test_x64_emit
1414
1515
use super::*;

crates/c-api/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ cap-std = { version = "0.19.1", optional = true }
3434

3535
[features]
3636
default = ['jitdump', 'wat', 'wasi', 'cache']
37-
lightbeam = ["wasmtime/lightbeam"]
3837
jitdump = ["wasmtime/jitdump"]
3938
cache = ["wasmtime/cache"]
4039
wasi = ['wasi-common', 'wasi-cap-std-sync', 'wasmtime-wasi', 'cap-std']

crates/c-api/include/wasmtime/config.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,13 @@ typedef uint8_t wasmtime_strategy_t;
2626
* The default value is #WASMTIME_STRATEGY_AUTO.
2727
*/
2828
enum wasmtime_strategy_enum { // Strategy
29-
/// Wasmtime will automatically determine whether to use Cranelift or
30-
/// Lightbeam, and currently it will always pick Cranelift. This default may
31-
/// change over time though.
29+
/// Automatically picks the compilation backend, currently always defaulting
30+
/// to Cranelift.
3231
WASMTIME_STRATEGY_AUTO,
3332

34-
/// Indicates that Cranelift will unconditionally use Cranelift to compile
33+
/// Indicates that Wasmtime will unconditionally use Cranelift to compile
3534
/// WebAssembly code.
3635
WASMTIME_STRATEGY_CRANELIFT,
37-
38-
/// Indicates that Cranelift will unconditionally use Lightbeam to compile
39-
/// WebAssembly code. Note that Lightbeam isn't always enabled at compile
40-
/// time, and if that's the case an error will be returned.
41-
WASMTIME_STRATEGY_LIGHTBEAM,
4236
};
4337

4438
/**

crates/c-api/src/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ wasmtime_c_api_macros::declare_own!(wasm_config_t);
2020
pub enum wasmtime_strategy_t {
2121
WASMTIME_STRATEGY_AUTO,
2222
WASMTIME_STRATEGY_CRANELIFT,
23-
WASMTIME_STRATEGY_LIGHTBEAM,
2423
}
2524

2625
#[repr(u8)]
@@ -114,7 +113,6 @@ pub extern "C" fn wasmtime_config_strategy_set(
114113
let result = c.config.strategy(match strategy {
115114
WASMTIME_STRATEGY_AUTO => Strategy::Auto,
116115
WASMTIME_STRATEGY_CRANELIFT => Strategy::Cranelift,
117-
WASMTIME_STRATEGY_LIGHTBEAM => Strategy::Lightbeam,
118116
});
119117
handle_result(result, |_cfg| {})
120118
}

0 commit comments

Comments
 (0)