This document describes changes between tagged Binaryen versions.
To browse or download snapshots of old tagged versions, visit https://github.com/WebAssembly/binaryen/releases.
Not all changes are documented here. In particular, new features, user-oriented fixes, options, command-line parameters, usage changes, deprecations, significant internal modifications and optimizations etc. generally deserve a mention. To examine the full set of changes between versions, visit the link to full changeset diff at the end of each section.
BinaryenBlockGetChild
to BinaryenBlockGetChildAt
BinaryenSwitchGetName
to BinaryenSwitchGetNameAt
BinaryenCallGetOperand
to BinaryenCallGetOperandAt
BinaryenCallIndirectGetOperand
to BinaryenCallIndirectGetOperandAt
BinaryenHostGetOperand
to BinaryenHostGetOperandAt
BinaryenThrowGetOperand
to BinaryenThrowGetOperandAt
BinaryenTupleMakeGetOperand
to BinaryenTupleMakeGetOperandAt
BinaryenSetAPITracing
and the JS-API’s setAPITracing
have been removed because this feature was not very useful anymore and had a significant maintainance cost.stackSave
, stackAlloc
, stackRestore
function. It not expects them to be included in the input file.multivalue
feature has been added. It allows functions and control flow structures to return tuples and for locals and globals to have tuple types. Tuples are created with the new tuple.make
pseudoinstruction and their elements are retrieved with the new tuple.extract
pseudoinstruction.dylink
section in Binaryen IR, so we can read, write, and update it.BinaryenExpressionGetSideEffects
(C API) and getSideEffects
(JS API) now takes an additional features
parameter.ref.null
, ref.is_null
, ref.func
, and typed select
. Table instructions are not supported yet. For typed select
, C/JS API can take an additional ‘type’ parameter.local.tee
's C/Binaryen.js API now takes an additional type parameter for its local type, like local.get
. This is required to handle subtypes.notify
-> atomic.notify
i32.wait
/ i64.wait
-> i32.atomic.wait
/ i64.atomic.wait
flags
argument in setMemory
function is removed.atomic.fence
instruction support is added.mutable
parameter to BinaryenAddGlobalImport.offset
parameter to BinaryenSetFunctionTable.params
and results
types local to each function.binaryen_wasm
target. Unlike the JS variant, the Wasm variant requires asynchronously awaiting the Wasm blob's instantiation and initialization before being usable, using the binaryen.ready
promise, e.g. binaryen.ready.then(() => ...)
.binaryen
(was Binaryen
) as its global name to align with the npm package.getMemorySegmentInfoByIndex
now has the same structure as the respective inputs on creation (byteOffset
-> offset
).tail-call
feature including the return_call
and return_call_indirect
instructions is ready to use.typeuse ::= (type index|name)+ | (type index|name)+ (param ..)* (result ..)* | (param ..)* (result ..)*Also, all (local) nodes in function definition should be after all typeuse elements.
get_local
/ getLocal
set_local
/ setLocal
tee_local
/ teeLocal
get_global
/ getGlobal
set_global
/ setGlobal
current_memory
/ currentMemory
grow_memory
/ growMemory
They are now available as their new instruction names: local.get
, local.set
, local.tee
, global.get
, global.set
, memory.size
, and memory.grow
.namedGlobals
to metadata output of wasm-emscripten-finalizesegmentPassive
argument to BinaryenSetMemory
for marking segments passive.-o -
print to stdout instead of a file named “-”.RelooperCreate
in the C API now has a Module parameter, and RelooperRenderAndDispose
does not.Relooper
constructor receive the Module
.BinaryenSetFunctionTable
in the C API no longer accepts an array of functions, instead it accepts an array of function names, const char** funcNames
. Previously, you could not include imported functions because they are of type BinaryenImportRef
instead of BinaryenFunctionRef
. #1650
BinaryenSetFunctionTable
in the C API now expects the initial and maximum table size as additional parameters, like BinaryenSetMemory
does for pages, so tables can be grown dynamically. #1687
Add shared
parameters to BinaryenAddMemoryImport
and BinaryenSetMemory
, to support a shared memory. #1686