Skip to content

[JS API] support BinaryenAddFunctionWithHeapType - #9437

Merged
kripken merged 2 commits into
WebAssembly:mainfrom
chharvey:feat/jsapi-add-func-heaptype
Dec 1, 2026
Merged

kripken merged 2 commits into
WebAssembly:mainfrom
chharvey:feat/jsapi-add-func-heaptype

Conversation

@chharvey

Copy link
Copy Markdown
Contributor

Adds JS support for BinaryenAddFunctionWithHeapType by adding a new overload
to the Module#addFunction method, taking only four arguments:

mod.addFunction(name, heapType, varTypes, body);

This is a non-breaking change. When users don’t have a heap type,
they can still call the five-argument form:

mod.addFunction(name, paramType, resultType, varTypes, body);

@github-actions
github-actions Bot requested a review from aheejin November 30, 2026 16:39
Comment thread src/js/binaryen.js-post.js Resolved
@kripken
kripken merged commit 9ad18b6 into WebAssembly:main Dec 1, 2026
19 checks passed
@chharvey
chharvey deleted the feat/jsapi-add-func-heaptype branch December 1, 2026 19:07
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