Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Wasmtime dependency from wasmi_wasi crate #563

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Nov 17, 2022

Closes #561.

Unfortunately wiggle version 1.0.2 is the most recent version that is Wasm runtime agnostic. All later major wiggle versions starting with wiggle version 2.0.0 and up and therefore also all later wasi-common version (since wasi-common builds on top of wiggle) are directly depending on Wasmtime.
Therefore a downgrade from version 2.0.0 to version 1.0.0 was necessary to fix this issue for wasmi.

In the long run we (wasmi team) might have to ship our own WASI implementation or find an alternative solution since we do not want us to depend on Wasmtime or any other Wasm runtime.

@paritytech-cicd-pr
Copy link

BENCHMARKS

NATIVEWASMTIME
BENCHMARKMASTERPRDIFFMASTERPRDIFFWASMTIME OVERHEAD
execute/
bare_call_0
1.01ms 1.01ms ⚪ -0.10% 976.88µs 947.90µs 🟢 -2.99% 🟢 -6%
execute/
bare_call_0/typed
527.67µs 527.48µs ⚪ 0.11% 405.88µs 399.71µs 🟢 -1.50% 🟢 -24%
execute/
bare_call_1
1.07ms 1.06ms 🟢 -0.44% 1.15ms 1.16ms 🟢 1.16% 🟢 10%
execute/
bare_call_16
2.15ms 2.23ms 🟢 1.30% 4.81ms 4.73ms 🟢 -1.73% 🔴 112%
execute/
bare_call_16/typed
1.57ms 1.40ms 🟢 -11.05% 2.17ms 1.97ms 🟢 -9.01% 🟢 41%
execute/
bare_call_1/typed
610.36µs 609.41µs ⚪ -0.11% 710.96µs 683.85µs 🟢 -3.97% 🟢 12%
execute/
bare_call_4
1.19ms 1.19ms ⚪ 0.14% 1.75ms 1.71ms 🟢 -2.03% 🟢 44%
execute/
bare_call_4/typed
621.24µs 620.40µs ⚪ 0.25% 816.75µs 807.30µs ⚪ -1.17% 🟢 30%
execute/
br_table
626.02µs 629.32µs ⚪ 0.95% 978.45µs 880.66µs 🟢 -9.95% 🟢 40%
execute/
count_until
1.19ms 652.18µs 🟢 -45.00% 2.06ms 2.01ms 🟢 -2.55% 🔴 208%
execute/
factorial_iterative
304.42µs 303.52µs ⚪ -0.35% 847.08µs 846.72µs ⚪ -0.02% 🔴 179%
execute/
factorial_recursive
609.07µs 633.73µs 🔴 4.01% 1.25ms 1.26ms ⚪ 0.84% 🟡 99%
execute/
fib_iterative
1.44ms 1.43ms ⚪ -0.14% 4.46ms 4.50ms ⚪ 0.74% 🔴 214%
execute/
fib_recursive
5.75ms 5.82ms 🔴 1.26% 11.28ms 11.35ms ⚪ 0.70% 🟡 95%
execute/
global_bump
949.12µs 949.65µs ⚪ 0.02% 3.18ms 3.12ms 🟢 -1.52% 🔴 229%
execute/
global_const
718.52µs 725.83µs ⚪ 0.98% 2.32ms 2.42ms 🔴 3.57% 🔴 233%
execute/
host_calls
28.96µs 32.27µs 🔴 11.55% 39.31µs 39.97µs 🔴 1.63% 🟢 24%
execute/
memory_fill
1.29ms 1.28ms ⚪ -0.74% 4.00ms 3.90ms 🟢 -2.46% 🔴 205%
execute/
memory_sum
1.26ms 1.25ms ⚪ -0.80% 3.96ms 3.93ms ⚪ -0.84% 🔴 214%
execute/
memory_vec_add
2.68ms 2.68ms ⚪ -0.09% 8.20ms 8.27ms ⚪ 1.05% 🔴 209%
execute/
recursive_is_even
1.16ms 1.11ms 🟢 -3.64% 2.24ms 2.10ms 🟢 -6.31% 🟡 89%
execute/
recursive_ok
146.95µs 145.74µs ⚪ -1.59% 299.14µs 293.55µs 🟢 -2.02% 🔴 101%
execute/
recursive_scan
189.90µs 178.91µs 🟢 -5.64% 377.29µs 370.26µs 🟢 -1.81% 🔴 107%
execute/
recursive_trap
14.97µs 14.36µs 🟢 -4.06% 29.28µs 29.98µs 🔴 2.34% 🔴 109%
execute/
regex_redux
550.92µs 545.63µs ⚪ -0.18% 1.46ms 1.40ms 🟢 -4.19% 🔴 156%
execute/
rev_complement
506.49µs 509.59µs ⚪ 0.79% 1.43ms 1.39ms 🟢 -3.12% 🔴 172%
execute/
tiny_keccak
375.04µs 374.00µs ⚪ -0.15% 1.23ms 1.15ms 🟢 -6.76% 🔴 207%
execute/
trunc_f2i
919.47µs 917.50µs ⚪ -0.26% 2.43ms 2.37ms 🟢 -2.28% 🔴 159%
instantiate/
wasm_kernel
58.60µs 60.79µs 🔴 2.98% 95.70µs 68.11µs 🟢 -28.62% 🟢 12%
translate/
erc1155
204.74µs 206.31µs ⚪ 0.72% 379.43µs 377.29µs ⚪ -0.81% 🟡 83%
translate/
erc20
101.49µs 101.09µs ⚪ -0.37% 184.71µs 186.70µs 🔴 1.25% 🟡 85%
translate/
erc721
144.98µs 145.61µs ⚪ 0.09% 270.62µs 269.18µs ⚪ -0.53% 🟡 85%
translate/
spidermonkey
0.00ns 0.00ns ⚪ -0.38% 0.00ns 0.00ns ⚪ -0.35% 🟢 0%
translate/
wasm_kernel
3.88ms 3.86ms ⚪ -0.21% 7.08ms 7.05ms ⚪ -0.41% 🟡 83%

Link to pipeline

@codecov-commenter
Copy link

Codecov Report

Merging #563 (23c9f2e) into master (23df536) will decrease coverage by 0.03%.
The diff coverage is 68.42%.

@@            Coverage Diff             @@
##           master     #563      +/-   ##
==========================================
- Coverage   80.07%   80.03%   -0.04%     
==========================================
  Files          77       78       +1     
  Lines        6304     6322      +18     
==========================================
+ Hits         5048     5060      +12     
- Misses       1256     1262       +6     
Impacted Files Coverage Δ
crates/wasi/src/guest_memory.rs 66.66% <66.66%> (ø)
crates/wasi/src/snapshots/preview_1.rs 81.25% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Robbepop Robbepop merged commit 93c1596 into master Nov 17, 2022
@Robbepop Robbepop deleted the rf-remove-wasmtime-dependency branch November 17, 2022 10:19
Berrysoft added a commit to Berrysoft/wasmi that referenced this pull request Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasmi_wasi brings wasmtime as dependency
3 participants