Wasm 2.0 已完成 - WebAssembly

  • Publication Info: Published on March 20, 2025 by Andreas Rossberg.
  • Wasm 2.0 Status: As of last December, release 2.0 is “official”. It was reached consensus and finished in early 2022 and major implementations have been shipping it for longer. Took a while to advance through the W3C process and reach “Candidate Recommendation” status.
  • Working Group Model: With 2.0, the Working Group switches to an “evergreen” model. The Candidate Recommendation will be updated in place for new language versions without reaching the final Recommendation state. The latest Candidate Recommendation Draft is considered the current standard.
  • Latest Specification Source: For the most up-to-date version, look at the documents on the GitHub page, which includes fixes and multiple formats.
  • Additions in Wasm 2.0:

    • Vector instructions: 236 new instructions for 128-bit wide SIMD functionality like Intel’s SSE or ARM’s SVE to speed up compute-intense applications.
    • Bulk memory instructions: New instructions for faster memory and table region copying and initialization.
    • Multi-value results: Instructions, blocks, and functions can return more than one result value, supporting faster calling and enabling new program transformations.
    • Reference types: References to functions and external object pointers become first-class values. Tables are used for reference storage and new instructions for access and mutation. Modules can define multiple table types.
    • Non-trapping conversions: Additional instructions for float to integer conversions without trapping.
    • Sign extension instructions: New instructions for directly extending signed integer width.
  • Backwards Compatibility: Wasm 2.0 is fully backwards-compatible with 1.0; every valid program remains valid and preserves its behavior.
  • Future Post: A future post will look at Wasm 3.0 which is coming soon.
阅读 44
0 条评论