Skip to content

Commit

Permalink
wasmtime: remove lightbeam support code (#11529)
Browse files Browse the repository at this point in the history
Lightbeam backend has been removed from wasmtime all the way back in
2021. The supporting code we have here won't build, and we don't test it
either.

bytecodealliance/wasmtime#3390
  • Loading branch information
nagisa authored Jun 13, 2024
1 parent 7551adb commit 26a97fc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions runtime/near-vm-runner/src/wasmtime_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,11 @@ impl IntoVMError for anyhow::Error {
}
}

#[cfg(not(feature = "lightbeam"))]
#[allow(clippy::needless_pass_by_ref_mut)]
pub fn get_engine(config: &mut wasmtime::Config) -> Engine {
Engine::new(config).unwrap()
}

#[cfg(feature = "lightbeam")]
pub fn get_engine(config: &mut wasmtime::Config) -> Engine {
Engine::new(config.strategy(wasmtime::Strategy::Lightbeam).unwrap()).unwrap()
}

pub(crate) fn wasmtime_vm_hash() -> u64 {
// TODO: take into account compiler and engine used to compile the contract.
64
Expand Down
6 changes: 0 additions & 6 deletions runtime/runtime-params-estimator/compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ if [ "$1" == "wasmtime" ]; then
VMKIND="$1";
features="$features"
fi
if [ "$1" == "lightbeam" ]; then
VMKIND="wasmtime"
features="$features,lightbeam"
fi



set -ex

Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime-params-estimator/estimate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ features="required"

if [[ ! -z "$1" ]]; then
features="$features,$1"
if [[ "$1" == *"wasmtime"* || "$1" == *"lightbeam"* ]]; then
if [[ "$1" == *"wasmtime"* ]]; then
vmkind="wasmtime";
fi
fi
Expand Down

0 comments on commit 26a97fc

Please sign in to comment.