gear icon indicating copy to clipboard operation
gear copied to clipboard

wasm-builder uses hacks to build WASMs

Open StackOverflowExcept1on opened this issue 1 year ago • 0 comments

Problem

Starting with Rust 1.82 WASMs contain multi-value and reference-types features: https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features.html.

We currently use hack #4247 to solve this issue. This hack results in end user having to install rust-src component, -Zbuild-std increases build time, removing -Clinker-plugin-lto increases binary sizes, and RUSTC_BOOTSTRAP=1 reduces stability since the user may be using nightly features in WASMs.

Steps

No response

Possible Solution

  • Update wasmi executor
    • TODO: update sandbox-wasmi to >=0.24
  • Support multi-value and reference-types parsing in our parity-wasm fork
    • https://github.com/gear-tech/parity-wasm/pull/4
    • TODO: reference-types
  • Support multi-value and reference-types in parity-wasm-instrument
    • https://github.com/gear-tech/wasm-instrument/pull/8
    • TODO: reference-types
  • Benchmarks of new instructions, possibly charging gas for tables, etc.

Notes

No response

Relevant Log Output

No response

StackOverflowExcept1on avatar Sep 14 '24 12:09 StackOverflowExcept1on