Stream: general

Topic: Generating WASM Code


view this post on Zulip Nathaniel Cook (Sep 10 2021 at 22:15):

Hi all I am exploring the idea of making the DSL I manage generate WASM code. Any pointers on where to get started? I haven't found any projects that facilitate in generating wasm binaries themselves. As I understand Cranelift can take WASM as input and convert it to its own IR and then execute it via a JIT runtime. Where do I start to make my DSL generate WASM in the first place? Currently my DSL is implemented as a tree walking interpreter.

view this post on Zulip Mario Carneiro (Sep 10 2021 at 22:31):

Looks like parity-wasm can be used to do low level binary serialization of a WASM module

view this post on Zulip Nathaniel Cook (Sep 10 2021 at 22:36):

thanks I'll check that out

view this post on Zulip Till Schneidereit (Sep 11 2021 at 12:14):

Another project to look at is Walrus

Walrus is a WebAssembly transformation library ๐ŸŒŠ๐Ÿ˜. Contribute to rustwasm/walrus development by creating an account on GitHub.

view this post on Zulip fitzgen (he/him) (Sep 13 2021 at 16:30):

and wasm-encoder: https://docs.rs/wasm-encoder/0.6.0/wasm_encoder/


Last updated: Nov 22 2024 at 17:03 UTC