#webassembly #wasm

no-std cranelift-wasm

Translator from WebAssembly to Cranelift IR

31 breaking releases

✓ Uses Rust 2018 edition

new 0.45.0 Oct 9, 2019
0.43.1 Sep 20, 2019
0.37.0 Jul 27, 2019
0.30.0 Mar 26, 2019
0.17.0 Jul 24, 2018

#19 in WebAssembly

Download history 1180/week @ 2019-06-26 973/week @ 2019-07-03 639/week @ 2019-07-10 490/week @ 2019-07-17 536/week @ 2019-07-24 1538/week @ 2019-07-31 1082/week @ 2019-08-07 749/week @ 2019-08-14 951/week @ 2019-08-21 567/week @ 2019-08-28 951/week @ 2019-09-04 1067/week @ 2019-09-11 1329/week @ 2019-09-18 1723/week @ 2019-09-25 1018/week @ 2019-10-02

4,135 downloads per month
Used in 20 crates (14 directly)

Apache-2.0 WITH LLVM-exception

2MB
35K 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.6–2.2MB
~49K SLoC