#wasm-module #ir #translation #table #cretonne #global

yanked cretonne-wasm

Translator from WebAssembly to Cretonne IR

Uses old Rust 2015

0.13.2 Jul 14, 2018
0.12.0 Jun 16, 2018
0.4.1 Mar 18, 2018

#4 in #cretonne

Apache-2.0

2MB
38K SLoC

Rust 28K SLoC // 0.1% comments Python 9K SLoC // 0.4% comments Shell 15 SLoC // 0.3% comments INI 4 SLoC

Cretonne has been renamed to Cranelift! For future versions, see the cranelift-wasm crate.

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


lib.rs:

Performs translation from a wasm module in binary format to the in-memory form of Cretonne 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

~3.5MB
~73K SLoC