Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/crates/cranelift/src/translate/mod.rs
1692 views
1
//! Performs translation from a wasm module in binary format to the in-memory form
2
//! of Cranelift IR. More particularly, it translates the code of all the functions bodies and
3
//! interacts with an environment implementing the
4
//! [`ModuleEnvironment`](trait.ModuleEnvironment.html)
5
//! trait to deal with tables, globals and linear memory.
6
//!
7
//! The main function of this module is [`translate_module`](fn.translate_module.html).
8
//!
9
//! Note that this module used to be the `cranelift-wasm` crate historically and
10
//! it's in a transitionary period of being slurped up into
11
//! `wasmtime-cranelift`.
12
13
mod code_translator;
14
mod environ;
15
mod func_translator;
16
mod heap;
17
mod stack;
18
mod table;
19
mod translation_utils;
20
21
pub use self::environ::{GlobalVariable, StructFieldsVec, TargetEnvironment};
22
pub use self::func_translator::FuncTranslator;
23
pub use self::heap::{Heap, HeapData};
24
pub use self::stack::FuncTranslationStacks;
25
pub use self::table::{TableData, TableSize};
26
pub use self::translation_utils::*;
27
28