RoyalIcing / Orb

Write WebAssembly with Elixir
https://useorb.dev
BSD 3-Clause "New" or "Revised" License
174 stars 1 forks source link

Compile to `.wasm` #12

Open RoyalIcing opened 5 months ago

RoyalIcing commented 5 months ago

Currently Orb only outputs WebAssembly text format (.wat). This can run in some libraries like wasmex or be converted using wat2wasm but it would be best to output .wasm directly.

This would involve adding a Orb.ToWasm protocol to pair with the existing Orb.ToWat one, and a boat load of integration tests.

RoyalIcing commented 1 month ago

Lo has a really easy to follow wasm outputter: https://github.com/glebbash/LO/blob/60b80d1b325136ce1ceaf4dc12073b7faaceb853/src/wasm.rs