Skip to content

Commit 0ff2e21

Browse files
authored
Merge pull request #2387 from CosmWasm/bye-cranelift
Remove the cranelift feature
2 parents 1ca93a4 + 1f90ec6 commit 0ff2e21

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ and this project adheres to
3131
process. ([#2155])
3232
- cosmwasm-vm: Updated wasmer to 5.0.4 ([#2374])
3333
- cosmwasm-vm: Charge gas for `write_region` ([#2378])
34+
- cosmwasm-vm: Remove the `cranelift` feature. This was doing nothing since
35+
2.2.0 already. ([#2262])
3436

3537
## Fixed
3638

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

4143
[#2155]: https://github.com/CosmWasm/cosmwasm/issues/2155
44+
[#2262]: https://github.com/CosmWasm/cosmwasm/issues/2262
4245
[#2268]: https://github.com/CosmWasm/cosmwasm/issues/2268
4346
[#2269]: https://github.com/CosmWasm/cosmwasm/issues/2269
4447
[#2310]: https://github.com/CosmWasm/cosmwasm/pull/2310

packages/vm/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ stargate = ["cosmwasm-std/stargate"]
3131
# For heap profiling. Only used in the "heap_profiling" example.
3232
dhat-heap = ["dep:dhat"]
3333

34-
# Legacy no-op feature. This is kept for compatibility with older contracts.
35-
# Delete this with the next major release.
36-
cranelift = []
37-
3834
[lib]
3935
# See https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
4036
bench = false

packages/vm/src/wasm_backend/engine.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn cost(operator: &Operator) -> u64 {
4545
}
4646
}
4747

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

113+
#[test]
114+
fn make_compiler_config_returns_singlepass() {
115+
let cc = Box::new(make_compiler_config());
116+
assert_eq!(cc.compiler().name(), "singlepass");
117+
}
118+
113119
#[test]
114120
fn limit_to_pages_works() {
115121
// rounds down

0 commit comments

Comments
 (0)