From 89afa08c95c0fda67500f3089dce27f3c59542ac Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 10 Jun 2024 14:43:06 +0300 Subject: [PATCH] wasmtime: remove lightbeam support code 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. --- runtime/near-vm-runner/src/wasmtime_runner.rs | 6 ------ runtime/runtime-params-estimator/compiler.sh | 6 ------ runtime/runtime-params-estimator/estimate.sh | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/runtime/near-vm-runner/src/wasmtime_runner.rs b/runtime/near-vm-runner/src/wasmtime_runner.rs index 8814eab0c7b..f8d84350b61 100644 --- a/runtime/near-vm-runner/src/wasmtime_runner.rs +++ b/runtime/near-vm-runner/src/wasmtime_runner.rs @@ -120,17 +120,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 diff --git a/runtime/runtime-params-estimator/compiler.sh b/runtime/runtime-params-estimator/compiler.sh index 06cb67f9510..3f121848318 100755 --- a/runtime/runtime-params-estimator/compiler.sh +++ b/runtime/runtime-params-estimator/compiler.sh @@ -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 diff --git a/runtime/runtime-params-estimator/estimate.sh b/runtime/runtime-params-estimator/estimate.sh index 7beee35223e..584773b711e 100755 --- a/runtime/runtime-params-estimator/estimate.sh +++ b/runtime/runtime-params-estimator/estimate.sh @@ -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