Skip to content

Commit

Permalink
Merge pull request #2387 from CosmWasm/bye-cranelift
Browse files Browse the repository at this point in the history
Remove the cranelift feature
  • Loading branch information
webmaster128 authored Feb 19, 2025
2 parents 1ca93a4 + 1f90ec6 commit 0ff2e21
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ and this project adheres to
process. ([#2155])
- cosmwasm-vm: Updated wasmer to 5.0.4 ([#2374])
- cosmwasm-vm: Charge gas for `write_region` ([#2378])
- cosmwasm-vm: Remove the `cranelift` feature. This was doing nothing since
2.2.0 already. ([#2262])

## Fixed

Expand All @@ -39,6 +41,7 @@ and this project adheres to
- cosmwasm-vm: Fix CWA-2025-002.

[#2155]: https://github.com/CosmWasm/cosmwasm/issues/2155
[#2262]: https://github.com/CosmWasm/cosmwasm/issues/2262
[#2268]: https://github.com/CosmWasm/cosmwasm/issues/2268
[#2269]: https://github.com/CosmWasm/cosmwasm/issues/2269
[#2310]: https://github.com/CosmWasm/cosmwasm/pull/2310
Expand Down
4 changes: 0 additions & 4 deletions packages/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ stargate = ["cosmwasm-std/stargate"]
# For heap profiling. Only used in the "heap_profiling" example.
dhat-heap = ["dep:dhat"]

# Legacy no-op feature. This is kept for compatibility with older contracts.
# Delete this with the next major release.
cranelift = []

[lib]
# See https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
bench = false
Expand Down
8 changes: 7 additions & 1 deletion packages/vm/src/wasm_backend/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn cost(operator: &Operator) -> u64 {
}
}

/// Use Cranelift as the compiler backend if the feature is enabled
/// Creates a compiler config using Singlepass
pub fn make_compiler_config() -> impl CompilerConfig + Into<Engine> {
wasmer::Singlepass::new()
}
Expand Down Expand Up @@ -110,6 +110,12 @@ mod tests {
assert_eq!(cost(&Operator::I64Extend8S {}), 115);
}

#[test]
fn make_compiler_config_returns_singlepass() {
let cc = Box::new(make_compiler_config());
assert_eq!(cc.compiler().name(), "singlepass");
}

#[test]
fn limit_to_pages_works() {
// rounds down
Expand Down

0 comments on commit 0ff2e21

Please sign in to comment.