binaryen
binaryen copied to clipboard
Optimizer and compiler/toolchain library for WebAssembly
We have for example this Dart code ```dart const _codeUnitsCacheSize = 512; final _codeUnitsCache = WasmArray(_codeUnitsCacheSize); JSStringImpl _jsStringFromAsciiBytes(U8List source, int start, int end) { final length = end - start;...
As can be seen [in this build log](https://buildd.debian.org/status/fetch.php?pkg=binaryen&arch=armel&ver=122-3&stamp=1738986751&raw=0) -[LoggingExternalInterface logging nan:0x7fff82] +[LoggingExternalInterface logging -nan:0x7fff82] [The best I could find about this](https://github.com/dart-lang/sdk/issues/49423#issuecomment-1178979421).
Many C++ libraries require exceptions, like [`libriscv`](https://github.com/libriscv/libriscv) and Binaryen itself. Compiling them to WASI would work (as `wasi-sdk`, iirc, supports WASM exceptions), but some WASM parsers (like [my fork of...
``` BinaryenAddFunctionImport(module, internalName, "env", "externalBaseName", params, result); BinaryenFunctionRef func = BinaryenGetFunction(module, ret); func->setExplicitName(internalName); ``` i think add and Get , It's a bit wasteful. why not return BinaryenFunctionRef on BinaryenAddFunctionImport?...
Hello, Apologies if this is already documented somewhere, but I was unable to find it. I'm trying to find out how I can easily find _where_ a particular call to...
Such WebAssembly code snippet will not be optimized by `wasm-opt` ```wasm (local $var i32) ... local.tee $var local.get $var i32.load i32.store ``` However, this equals ```c *var = *var ```...
The MemoryPacking pass assumes that the initial memory is zero, so it is free to remove spans of zeroes from active segments. This is not technically true with an imported...
I mean build binaryen with emscripten with "-fno-exceptions" for asmjs / wasm. But I guess other build targets without exceptions will be also benefits for it's size. As I know...
I am calling `wasm-merge`, `wasm-metadce`, and `wasm-opt` in sequence and the output of the first two steps both errors with "Some VMs may not accept this binary because it has...
Use wasm customSections, to fix Binaryen WASM to text format round tripping failing for side module
I have been investigating building a dynarec for an emulator using dynamic linking. The hope was that i could manually modify WASM text and compile the side module using binaryen.js...