#wasmer #fork #cranelift #webassembly #ir #merge #translator

wasmer-clif-fork-wasm

Translator from WebAssembly to Cranelift IR

8 releases (breaking)

0.59.0 Feb 26, 2020
0.52.0 Jan 15, 2020
0.44.0 Sep 26, 2019
0.43.1 Sep 24, 2019
0.31.1 Jul 24, 2019
Download history 350/week @ 2022-06-02 181/week @ 2022-06-09 385/week @ 2022-06-16 328/week @ 2022-06-23 247/week @ 2022-06-30 118/week @ 2022-07-07 217/week @ 2022-07-14 197/week @ 2022-07-21 270/week @ 2022-07-28 383/week @ 2022-08-04 366/week @ 2022-08-11 218/week @ 2022-08-18 228/week @ 2022-08-25 419/week @ 2022-09-01 693/week @ 2022-09-08 355/week @ 2022-09-15

1,699 downloads per month
Used in 10 crates (3 directly)

Apache-2.0 WITH LLVM-exception

340KB
6.5K SLoC

This is a (hopefully short-lived) fork of Cranelift so that we can continue publishing Wasmer runtime related crates on crates.io. If you're reading this and want to use Cranelift, you almost certainly want to use the version this is forked from. If you're associated with Cranelift and would like to merge any changes we have, please reach out to us at engineering@wasmer.io. We'll be submitting pull requests, too.

NOTE: this is a fork of version 0.31 of Cranelift.

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

~5.5MB
~128K SLoC