Skip to content

feat!: Upgrade to Binaryen v133 - #299

Open
spotandjake wants to merge 4 commits into
mainfrom
spotandjake/133
Open

spotandjake wants to merge 4 commits into
mainfrom
spotandjake/133

Conversation

@spotandjake

@spotandjake spotandjake commented Sep 21, 2026 •

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.

NOTE: I had to modify our ocaml constraints as it seems that ocaml 5.5.1 released making our package want ocaml 5.5.1 whereas ocp-ident is only compatible up to ocaml 5.5.0

@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
@spotandjake
spotandjake marked this pull request as ready for review September 23, 2026 20:03
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.
It seems the ci errors we were getting is because the underyling type of `BinaryenRefNull` changed to take a `HeapType` instead of a regular type however the c api wasn't updated.
…ndency resolutions, it seems like something changed in `ocp-indent`, it doesn't really matter because we don't use ocaml 6 anyways.
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