Skip to main content

wasmtime_environ/
lib.rs

1//! Internal dependency of the `wasmtime` crate.
2//!
3//! This crate is responsible for defining types and basic runtime structures
4//! used by the `wasmtime` crate. This additionally defines primitives of
5//! compilation and what compilers are expected to emit.
6//!
7//! If you don't already know what this crate is you probably want to use
8//! `wasmtime`, not this crate.
9
10#![deny(missing_docs)]
11#![warn(clippy::cast_sign_loss)]
12#![no_std]
13
14#[cfg(feature = "std")]
15#[macro_use]
16extern crate std;
17extern crate alloc;
18
19pub mod collections;
20pub mod graphs;
21pub mod prelude;
22
23mod address_map;
24mod frame_table;
25#[macro_use]
26mod builtin;
27mod demangling;
28mod ext;
29mod gc;
30mod hostcall;
31mod key;
32mod module;
33mod module_artifacts;
34mod module_types;
35pub mod obj;
36mod ref_bits;
37mod scopevec;
38mod stack_map;
39mod stack_switching;
40mod string_pool;
41mod trap_encoding;
42mod tunables;
43mod types;
44mod vmoffsets;
45mod wasm_error;
46
47pub use self::ext::*;
48pub use crate::address_map::*;
49pub use crate::builtin::*;
50pub use crate::demangling::*;
51pub use crate::frame_table::*;
52pub use crate::gc::*;
53pub use crate::hostcall::*;
54pub use crate::key::*;
55pub use crate::module::*;
56pub use crate::module_artifacts::*;
57pub use crate::module_types::*;
58pub use crate::ref_bits::*;
59pub use crate::scopevec::ScopeVec;
60pub use crate::stack_map::*;
61pub use crate::stack_switching::*;
62pub use crate::string_pool::{Atom, StringPool};
63pub use crate::trap_encoding::*;
64pub use crate::tunables::*;
65pub use crate::types::*;
66pub use crate::vmoffsets::*;
67pub use crate::wasm_error::*;
68pub use object;
69
70pub use wasmparser;
71
72#[cfg(feature = "compile")]
73mod compile;
74#[cfg(feature = "compile")]
75pub use crate::compile::*;
76
77#[cfg(feature = "component-model")]
78pub mod component;
79#[cfg(all(feature = "component-model", feature = "compile"))]
80pub mod fact;
81
82// Reexport all of these type-level since they're quite commonly used and it's
83// much easier to refer to everything through one crate rather than importing
84// one of three and making sure you're using the right one.
85pub use cranelift_entity::*;
86
87// Reexport the error module for convenience.
88#[doc(inline)]
89pub use wasmtime_core::error;
90
91#[cfg(feature = "anyhow")]
92pub use self::error::ToWasmtimeResult;
93
94pub use wasmtime_core::{alloc::PanicOnOom, non_max, undo::Undo};
95
96// Only for use with `bindgen!`-generated code.
97#[doc(hidden)]
98#[cfg(feature = "anyhow")]
99pub use anyhow;
100
101/// Version number of this crate.
102pub const VERSION: &str = env!("CARGO_PKG_VERSION");