Skip to content

Commit efded66

Browse files
committed
update wat2wasm version and opcode
1 parent 03274f2 commit efded66

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
- name: Install Wabt (wat2wasm)
1818
run: |
19-
wget https://github.com/WebAssembly/wabt/releases/download/1.0.17/wabt-1.0.17-ubuntu.tar.gz
20-
tar -zxf wabt-1.0.17-ubuntu.tar.gz
21-
sudo cp wabt-1.0.17/bin/wat2wasm /usr/local/bin
19+
wget https://github.com/WebAssembly/wabt/releases/download/1.0.29/wabt-1.0.29-ubuntu.tar.gz
20+
tar -zxf wabt-1.0.29-ubuntu.tar.gz
21+
sudo cp wabt-1.0.29/bin/wat2wasm /usr/local/bin
2222
2323
- name: Check cargo cache
2424
uses: actions/cache@v2

packages/vm/src/lib.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use pwasm_utils::{self, rules};
1414

1515
use wasmer::{imports, wasmparser, Function, Singlepass, Store, JIT};
1616

17-
use owasm_crypto::{ecvrf};
17+
use owasm_crypto::ecvrf;
1818

1919
// inspired by https://github.com/CosmWasm/cosmwasm/issues/81
2020
// 512 pages = 32mb
@@ -278,7 +278,6 @@ where
278278
let y: Vec<u8> = get_from_mem(env, y_ptr, y_len)?;
279279
let pi: Vec<u8>= get_from_mem(env, pi_ptr, pi_len)?;
280280
let alpha: Vec<u8> = get_from_mem(env, alpha_ptr, alpha_len)?;
281-
282281
Ok(ecvrf::ecvrf_verify(&y, &pi, &alpha) as u32)
283282
})
284283
}),
@@ -363,11 +362,11 @@ mod test {
363362
(import "env" "ask_external_data" (func (type 0)))
364363
(func
365364
(local $idx i32)
366-
(set_local $idx (i32.const 0))
365+
(local.set $idx (i32.const 0))
367366
(block
368367
(loop
369-
(set_local $idx (get_local $idx) (i32.const 1) (i32.add) )
370-
(br_if 0 (i32.lt_u (get_local $idx) (i32.const 1000000000)))
368+
(local.set $idx (local.get $idx) (i32.const 1) (i32.add) )
369+
(br_if 0 (i32.lt_u (local.get $idx) (i32.const 1000000000)))
371370
)
372371
)
373372
)
@@ -480,11 +479,11 @@ mod test {
480479
r#"(module
481480
(func
482481
(local $idx i32)
483-
(set_local $idx (i32.const 0))
482+
(local.set $idx (i32.const 0))
484483
(block
485484
(loop
486-
(set_local $idx (get_local $idx) (i32.const 1) (i32.add) )
487-
(br_if 0 (i32.lt_u (get_local $idx) (i32.const 1000000000)))
485+
(local.set $idx (local.get $idx) (i32.const 1) (i32.add) )
486+
(br_if 0 (i32.lt_u (local.get $idx) (i32.const 1000000000)))
488487
)
489488
)
490489
)

0 commit comments

Comments
 (0)