#webassembly #wasm

no-std cranelift-wasm

Translator from WebAssembly to Cranelift IR

42 breaking releases

✓ Uses Rust 2018 edition

0.56.0 Jan 17, 2020
0.54.0 Jan 10, 2020
0.52.0 Dec 18, 2019
0.51.0 Nov 21, 2019
0.17.0 Jul 24, 2018

#36 in WebAssembly

Download history 1073/week @ 2019-10-13 1415/week @ 2019-10-20 1731/week @ 2019-10-27 3091/week @ 2019-11-03 2419/week @ 2019-11-10 2072/week @ 2019-11-17 2400/week @ 2019-11-24 2410/week @ 2019-12-01 2827/week @ 2019-12-08 2137/week @ 2019-12-15 915/week @ 2019-12-22 1226/week @ 2019-12-29 4704/week @ 2020-01-05 3996/week @ 2020-01-12 2394/week @ 2020-01-19

10,362 downloads per month
Used in 20 crates (6 directly)

Apache-2.0 WITH LLVM-exception

2MB
37K SLoC

This crate performs the translation from a wasm module in binary format to the in-memory form of the Cranelift IR.

If you're looking for a complete WebAssembly implementation that uses this library, see Wasmtime.


lib.rs:

Performs translation from a wasm module in binary format to the in-memory form of Cranelift IR. More particularly, it translates the code of all the functions bodies and interacts with an environment implementing the ModuleEnvironment trait to deal with tables, globals and linear memory.

The crate provides a DummyEnvironment struct that will allow to translate the code of the functions but will fail at execution.

The main function of this module is translate_module.

Dependencies

~1.3–2MB
~43K SLoC