webassemblyjs
webassemblyjs copied to clipboard
Toolchain for WebAssembly
Issue Description: I use [wasm-crypto](https://www.npmjs.com/package/@polkadot/wasm-crypto) for the development and replace the `WebAssembly` with `webassemblyjs` in `wasm_bg.js`. But it throw errors in node env: ``` Expected type i32 but got i64...
Would should have a tool that reads the producer section and an API that exposes it to Webpack.
``` { instantiate: [Function: instantiate], compile: [Function: compile], validate: [Function: validate], instantiateFromSource: [Function: instantiateFromSource], Instance: [Function: Instance], Module: [Function: Module], Memory: [Function: Memory], Table: [Function: Table], RuntimeError: [Function: RuntimeError], LinkError:...
Some types are incorrect, for example `WebAssembly.compile` accepts only ArrayBuffer, but it should accept [BufferSource](https://heycam.github.io/webidl/#BufferSource) instead
The following calls the imported function only once: ```javascript webassemblyjs = require("webassemblyjs"); var code = ` (module (import "a" "a" (func $a (param i32))) (func $custom (param i32) (block (loop...
https://github.com/xtuc/webassemblyjs/blob/f558c6c047187f24a2200ab04104f173de226794/package.json#L47-L48 Should be moved to devdeps.
@TimHambourger made a very useful test harness, we could integrate it in our CI somehow (if @TimHambourger is ok with that). Note we can keep a seperated repo.
Following the discussion in https://github.com/xtuc/webassemblyjs/issues/407#issuecomment-406505692. We are missing test for transformation on a LEB128 padded binary.
I noticed this while submitting #413. If you add the following test to [ast-sync.js](https://github.com/xtuc/webassemblyjs/blob/master/packages/wasm-edit/test/ast-sync.js), it will fail: ```diff diff --git a/packages/wasm-edit/test/ast-sync.js b/packages/wasm-edit/test/ast-sync.js index 58be237..b0b4da1 100644 --- a/packages/wasm-edit/test/ast-sync.js +++ b/packages/wasm-edit/test/ast-sync.js @@...