Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh I see, sorry for misunderstanding.

Yeah, I think it would have been nice to have text format input support in browsers, but the decision was against that.

But you do have other options than emitting binary wasm yourself. You can use a compiled version of wabt or binaryen, here's an example of binaryen.js,

https://github.com/WebAssembly/binaryen/blob/master/test/bin...

edit: actually it looks like the test doesn't cover WasmBinaryWriter, which is what would be needed for this, we should improve that



Here's the emscripten-compiled wast2wasm (from wabt): https://cdn.rawgit.com/WebAssembly/wabt/2baa1ecb0b36bea6268c...

It uses the code from here: https://github.com/WebAssembly/wabt/tree/master/demo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: