Skip to content

Commit

Permalink
chore!: upgrade walrus to support memory64 and release 0.8.0 (#61)
Browse files Browse the repository at this point in the history
* upgrade walrus to 0.21.1

* ic-wasm bump to 0.8.0

* memory64
  • Loading branch information
lwshang authored Jul 9, 2024
1 parent d45e0b9 commit 535a3b5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 17 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.8.0]

* Upgrade dependency walrus.
* This enables ic-wasm to process memory64 Wasm modules.

## [0.7.3]

* Enable WebAssembly SIMD in `optimize` subcommand.
Expand Down
48 changes: 40 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ic-wasm"
version = "0.7.3"
version = "0.8.0"
authors = ["DFINITY Stiftung"]
edition = "2021"
description = "A library for performing Wasm transformations specific to canisters running on the Internet Computer"
Expand All @@ -18,7 +18,9 @@ path = "src/bin/main.rs"
required-features = ["exe"]

[dependencies]
walrus = "0.20.1"
# Major version bump of walrus should result in a major version bump of ic-wasm.
# Because we expose walrus types in ic-wasm public API.
walrus = "0.21.1"
candid = "0.10"
rustc-demangle = "0.1"
thiserror = "1.0.35"
Expand Down
14 changes: 7 additions & 7 deletions src/instrumentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ pub fn instrument(m: &mut Module, config: Config) -> Result<(), String> {
}
let is_partial_tracing = !trace_only_ids.is_empty();
let func_cost = FunctionCost::new(m);
let total_counter = m
.globals
.add_local(ValType::I64, true, InitExpr::Value(Value::I64(0)));
let total_counter =
m.globals
.add_local(ValType::I64, true, false, ConstExpr::Value(Value::I64(0)));
let log_size = m
.globals
.add_local(ValType::I32, true, InitExpr::Value(Value::I32(0)));
.add_local(ValType::I32, true, false, ConstExpr::Value(Value::I32(0)));
let page_size = m
.globals
.add_local(ValType::I32, true, InitExpr::Value(Value::I32(0)));
.add_local(ValType::I32, true, false, ConstExpr::Value(Value::I32(0)));
let is_init = m
.globals
.add_local(ValType::I32, true, InitExpr::Value(Value::I32(1)));
.add_local(ValType::I32, true, false, ConstExpr::Value(Value::I32(1)));
let is_entry = m
.globals
.add_local(ValType::I32, true, InitExpr::Value(Value::I32(0)));
.add_local(ValType::I32, true, false, ConstExpr::Value(Value::I32(0)));
let opt_init = if is_partial_tracing {
Some(is_init)
} else {
Expand Down

0 comments on commit 535a3b5

Please sign in to comment.