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

feat!: upgrade wasmparser & wasm-encoder to v0.212.0 #266

Merged
merged 25 commits into from
Jul 2, 2024

Conversation

lwshang
Copy link
Contributor

@lwshang lwshang commented Jun 25, 2024

Description

It is inevitable to introduce breaking changes so that we can make this project catch up with recent Wasm standard (and proposals).

New types

  • RefType is now a separate type which covers Funcref and Externref used to be in ValType
  • ElementItems which covers both Functions and Expressions

Types that have significant change

  • InitExpr => ConstExpr
  • Element: add item: ElementItems
  • Global: add shared: bool
  • Memory:
    • add memory64: bool
    • u64 for initial and maximum
    • add page_size_log2: Option<u32>
  • Table:
    • add table64: bool
    • u64 for initial and maximum

Wasm Feature

In module/mod.rs:

Fix wasm_features from wasmparser::WasmFeatures::default() regardless of config.only_stable_features.

Spec tests

  • Update the spec-tests (WebAssembly/testsuite) submodule
  • Reflect the latest set of Wasm proposals
  • Now run all core tests and the multi-memory proposal tests
  • Remove outdated special cases
  • Collect and show all failed test cases instead of only the first one

CI

Use the latest pre-compiled wabt and binaryen.

@guybedford
Copy link
Collaborator

Thanks for the PR! I'll gladly do a review and merge here further.

Are you able to get the remaining tests passing for this?

@lwshang lwshang changed the title feat!: upgrade wasmparser & wasm-encoder to v0.211.0 feat!: upgrade wasmparser & wasm-encoder to v0.212.0 Jun 29, 2024
@lwshang lwshang marked this pull request as ready for review June 29, 2024 16:06
This reverts commit 8272e87.
@lwshang
Copy link
Contributor Author

lwshang commented Jun 29, 2024

@guybedford

All CI checks have passed! Could you please review and merge my PR when you get a chance?

Next up, I'll be working on the "memory64" feature in a new PR soon.

Copy link
Collaborator

@guybedford guybedford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great work, thank you for getting this one over the line. Just a couple of comments on the TODOs then it would be great to land and release this.

src/module/functions/local_function/mod.rs Outdated Show resolved Hide resolved
src/module/mod.rs Outdated Show resolved Hide resolved
src/module/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Guy Bedford <guybedford@gmail.com>
@guybedford guybedford merged commit ede1265 into rustwasm:main Jul 2, 2024
8 checks passed
@lwshang lwshang deleted the upgrade_dependencies branch July 3, 2024 00:14
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.

2 participants