142 releases (91 breaking)

0.106.0 Mar 20, 2024
0.105.2 Feb 28, 2024
0.103.0 Dec 20, 2023
0.102.0 Nov 20, 2023
0.17.0 Jul 24, 2018

#1338 in WebAssembly

Download history 70160/week @ 2023-12-06 65838/week @ 2023-12-13 44978/week @ 2023-12-20 29092/week @ 2023-12-27 57297/week @ 2024-01-03 66697/week @ 2024-01-10 75623/week @ 2024-01-17 71232/week @ 2024-01-24 67096/week @ 2024-01-31 76006/week @ 2024-02-07 76260/week @ 2024-02-14 80654/week @ 2024-02-21 84395/week @ 2024-02-28 79797/week @ 2024-03-06 82689/week @ 2024-03-13 75404/week @ 2024-03-20

337,759 downloads per month
Used in 297 crates (4 directly)

Apache-2.0 WITH LLVM-exception

6.5MB
159K SLoC

Rust 109K SLoC // 0.1% comments WebAssembly 49K SLoC // 0.0% comments

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

~7MB
~135K SLoC