Skip to content

Commit

Permalink
chore(wasm-instrument): replace wasm-instrument with gwasm-instrument (
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop authored Aug 10, 2023
1 parent 062a900 commit 412549d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
27 changes: 17 additions & 10 deletions Cargo.lock

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

14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ which = "4.4.0"
winapi = "0.3.9"
paste = "1.0"

# Published deps
#
# fork of `parity-wasm` with sign-ext enabled by default.
#
# https://github.com/gear-tech/parity-wasm/tree/v0.45.0-sign-ext
# gear-wasm = "0.45.0"
#
# fork of `wasm-instrument`
#
# https://github.com/gear-tech/wasm-instrument/tree/v0.2.1-sign-ext
gwasm-instrument = { version = "0.2.1", default-features = false }

# Internal deps
authorship = { package = "gear-authorship", path = "node/authorship" }
common = { package = "gear-common", path = "common", default-features = false }
Expand Down Expand Up @@ -240,8 +252,6 @@ service = { package = "gear-service", path = "node/service", default-features =
testing = { package = "gear-node-testing", path = "node/testing" }
vara-runtime = { path = "runtime/vara" }
wasm-smith = { version = "0.11.4", git = "https://github.com/gear-tech/wasm-tools.git", branch = "gear-stable" }
wasm-instrument = { version = "0.2.1", git = "https://github.com/gear-tech/wasm-instrument.git", branch = "gear-stable", default-features = false }

validator-set = { package = 'substrate-validator-set', git = 'https://github.com/gear-tech/substrate-validator-set.git', branch = 'gear-polkadot-v0.9.41-canary-no-sandbox', default-features = false }

# Substrate deps
Expand Down
4 changes: 2 additions & 2 deletions utils/wasm-instrument/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition.workspace = true
license.workspace = true

[dependencies]
wasm-instrument = { workspace = true, features = ["sign_ext"] }
gwasm-instrument = { workspace = true, features = ["sign_ext"] }
enum-iterator.workspace = true

[dev-dependencies]
Expand All @@ -20,6 +20,6 @@ gear-core.workspace = true
default = ["std"]
std = [
"gear-backend-wasmi/std",
"wasm-instrument/std",
"gear-backend-wasmi/std",
"gwasm-instrument/std",
]
4 changes: 2 additions & 2 deletions utils/wasm-instrument/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern crate alloc;

use alloc::vec;

use wasm_instrument::{
use gwasm_instrument::{
gas_metering::{self, Rules},
parity_wasm::{
builder,
Expand All @@ -32,7 +32,7 @@ use wasm_instrument::{
};

use crate::syscalls::SysCallName;
pub use wasm_instrument::{self, parity_wasm};
pub use gwasm_instrument::{self as wasm_instrument, parity_wasm};

#[cfg(test)]
mod tests;
Expand Down
2 changes: 1 addition & 1 deletion utils/wasm-instrument/src/rules.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::num::NonZeroU32;
use wasm_instrument::{
use gwasm_instrument::{
gas_metering::{MemoryGrowCost, Rules},
parity_wasm::elements::{self, Instruction},
};
Expand Down

0 comments on commit 412549d

Please sign in to comment.