Skip to content

feat!: Upgrade to Binaryen v133 - #299

Draft
spotandjake wants to merge 1 commit into
mainfrom
spotandjake/133
Draft

spotandjake wants to merge 1 commit into
mainfrom
spotandjake/133

Conversation

@spotandjake

Copy link
Copy Markdown
Member

Full Diff: WebAssembly/binaryen@version_132...version_133

API Additions:

  • Passes.remove_empty_function_exports
  • Passes.tail_call
  • Type.exnref
  • Type.null_exnref
  • HeapType.exn
  • HeapType.noexn

API Removals:

  • Passes.trap_mode_clamp
  • Passes.trap_mode_js

Changes not made:

  • exception handling (brand new api not implemented yet)
    • BinaryenTryTable
    • BinaryenThrowRef
    • BinaryenTryTableGetBody
    • BinaryenTryTableSetBody
    • BinaryenTryTableGetNumCatches
    • BinaryenTryTableGetCatchTagAt
    • BinaryenTryTableSetCatchTagAt
    • BinaryenTryTableGetCatchDestAt
    • BinaryenTryTableSetCatchDestAt
    • BinaryenTryTableIsCatchRefAt
    • BinaryenTryTableSetCatchRefAt
    • BinaryenTryTableGetSentTypeAt
    • BinaryenTryTableAppendCatch
    • BinaryenTryTableInsertCatchAt
    • BinaryenTryTableRemoveCatchAt
    • BinaryenTryTableHasCatchAll
    • BinaryenThrowRefGetExnref
    • BinaryenThrowRefSetExnref
  • wait (new api, we should open an issue)
    • BinaryenStructWait
    • BinaryenWaitqueueNew
    • BinaryenWaitqueueNotify
    • BinaryenPublish
    • BinaryenStructWaitGetRef
    • BinaryenStructWaitSetRef
    • BinaryenStructWaitGetIndex
    • BinaryenStructWaitSetIndex
    • BinaryenStructWaitGetExpected
    • BinaryenStructWaitSetExpected
    • BinaryenStructWaitGetTimeout
    • BinaryenStructWaitSetTimeout
    • BinaryenStructWaitGetWaitqueue
    • BinaryenStructWaitSetWaitqueue
    • BinaryenWaitqueueNotifyGetWaitqueue
    • BinaryenWaitqueueNotifySetWaitqueue
    • BinaryenWaitqueueNotifyGetCount
    • BinaryenWaitqueueNotifySetCount
    • BinaryenPublishGetRef
    • BinaryenPublishSetRef
  • general apis (not handled by us)
    • BinaryenSideEffectSuspends

Notes:

  • I changed the HeapTypes api to use the js api rather than the underlying binaryen calls, this is more inline with how we handle things elsewhere. (The only reason this wasn't done originally is the js api didn't originally support them).

Grain Notes:

  • addDefaultFunctionOptimizationPasses was modified so we need to update our grain passes.

Draft: As I haven't figured out why our tests are failing.

Full Diff: WebAssembly/binaryen@version_132...version_133

API Additions:
* Passes.remove_empty_function_exports
* Passes.tail_call
* Type.exnref
* Type.null_exnref
* HeapType.exn
* HeapType.noexn

API Removals:
* Passes.trap_mode_clamp
* Passes.trap_mode_js

Changes not made:
* exception handling (brand new api not implemented yet)
  * BinaryenTryTable
  * BinaryenThrowRef
  * BinaryenTryTableGetBody
  * BinaryenTryTableSetBody
  * BinaryenTryTableGetNumCatches
  * BinaryenTryTableGetCatchTagAt
  * BinaryenTryTableSetCatchTagAt
  * BinaryenTryTableGetCatchDestAt
  * BinaryenTryTableSetCatchDestAt
  * BinaryenTryTableIsCatchRefAt
  * BinaryenTryTableSetCatchRefAt
  * BinaryenTryTableGetSentTypeAt
  * BinaryenTryTableAppendCatch
  * BinaryenTryTableInsertCatchAt
  * BinaryenTryTableRemoveCatchAt
  * BinaryenTryTableHasCatchAll
  * BinaryenThrowRefGetExnref
  * BinaryenThrowRefSetExnref
* wait (new api, we should open an issue)
  * BinaryenStructWait
  * BinaryenWaitqueueNew
  * BinaryenWaitqueueNotify
  * BinaryenPublish
  * BinaryenStructWaitGetRef
  * BinaryenStructWaitSetRef
  * BinaryenStructWaitGetIndex
  * BinaryenStructWaitSetIndex
  * BinaryenStructWaitGetExpected
  * BinaryenStructWaitSetExpected
  * BinaryenStructWaitGetTimeout
  * BinaryenStructWaitSetTimeout
  * BinaryenStructWaitGetWaitqueue
  * BinaryenStructWaitSetWaitqueue
  * BinaryenWaitqueueNotifyGetWaitqueue
  * BinaryenWaitqueueNotifySetWaitqueue
  * BinaryenWaitqueueNotifyGetCount
  * BinaryenWaitqueueNotifySetCount
  * BinaryenPublishGetRef
  * BinaryenPublishSetRef
* general apis (not handled by us)
  * BinaryenSideEffectSuspends

Notes:
* I changed the `HeapTypes` api to use the js api rather than the underlying binaryen calls, this is more inline with how we handle things elsewhere. (The only reason this wasn't done originally is the js api didn't originally support them).

Grain Notes:
* `addDefaultFunctionOptimizationPasses` was modified so we need to update our grain passes.
@spotandjake spotandjake self-assigned this Sep 21, 2026
@spotandjake spotandjake added the Binaryen Upgrade Issues or pull requests relating to a binaryen version upgrade. label Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Binaryen Upgrade Issues or pull requests relating to a binaryen version upgrade.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant