wasmtime_environ/
lib.rs

1//! Standalone environment for WebAssembly using Cranelift. Provides functions to translate
2//! `get_global`, `set_global`, `memory.size`, `memory.grow`, `call_indirect` that hardcode in
3//! the translation the base addresses of regions of memory that will hold the globals, tables and
4//! linear memories.
5
6#![deny(missing_docs)]
7#![warn(clippy::cast_sign_loss)]
8#![no_std]
9
10#[cfg(feature = "std")]
11#[macro_use]
12extern crate std;
13extern crate alloc;
14
15pub use wasmtime_types::prelude;
16
17mod address_map;
18mod builtin;
19mod demangling;
20mod gc;
21mod module;
22mod module_artifacts;
23mod module_types;
24pub mod obj;
25mod ref_bits;
26mod scopevec;
27mod stack_map;
28mod trap_encoding;
29mod tunables;
30mod vmoffsets;
31
32pub use crate::address_map::*;
33pub use crate::builtin::*;
34pub use crate::demangling::*;
35pub use crate::gc::*;
36pub use crate::module::*;
37pub use crate::module_artifacts::*;
38pub use crate::module_types::*;
39pub use crate::ref_bits::*;
40pub use crate::scopevec::ScopeVec;
41pub use crate::stack_map::StackMap;
42pub use crate::trap_encoding::*;
43pub use crate::tunables::*;
44pub use crate::vmoffsets::*;
45pub use object;
46
47#[cfg(feature = "compile")]
48mod compile;
49#[cfg(feature = "compile")]
50pub use crate::compile::*;
51
52#[cfg(feature = "component-model")]
53pub mod component;
54#[cfg(all(feature = "component-model", feature = "compile"))]
55pub mod fact;
56
57// Reexport all of these type-level since they're quite commonly used and it's
58// much easier to refer to everything through one crate rather than importing
59// one of three and making sure you're using the right one.
60pub use cranelift_entity::*;
61pub use wasmtime_types::*;
62
63/// Version number of this crate.
64pub const VERSION: &str = env!("CARGO_PKG_VERSION");