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(any(feature = "std", test))]
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;
27pub mod bytes;
28mod demangling;
29mod ext;
30mod gc;
31mod hostcall;
32mod key;
33mod module;
34mod module_artifacts;
35mod module_types;
36pub mod obj;
37mod ref_bits;
38mod scopevec;
39mod stack_map;
40mod stack_switching;
41mod string_pool;
42mod trap_encoding;
43mod tunables;
44mod types;
45mod vmoffsets;
46mod wasm_error;
47
48pub use self::ext::*;
49pub use crate::address_map::*;
50pub use crate::builtin::*;
51pub use crate::demangling::*;
52pub use crate::frame_table::*;
53pub use crate::gc::*;
54pub use crate::hostcall::*;
55pub use crate::key::*;
56pub use crate::module::*;
57pub use crate::module_artifacts::*;
58pub use crate::module_types::*;
59pub use crate::ref_bits::*;
60pub use crate::scopevec::ScopeVec;
61pub use crate::stack_map::*;
62pub use crate::stack_switching::*;
63pub use crate::string_pool::{Atom, StringPool};
64pub use crate::trap_encoding::*;
65pub use crate::tunables::*;
66pub use crate::types::*;
67pub use crate::vmoffsets::*;
68pub use crate::wasm_error::*;
69pub use object;
70
71pub use wasmparser;
72
73#[cfg(feature = "compile")]
74mod compile;
75#[cfg(feature = "compile")]
76pub use crate::compile::*;
77
78#[cfg(feature = "component-model")]
79pub mod component;
80#[cfg(all(feature = "component-model", feature = "compile"))]
81pub mod fact;
82
83// Reexport all of these type-level since they're quite commonly used and it's
84// much easier to refer to everything through one crate rather than importing
85// one of three and making sure you're using the right one.
86pub use cranelift_entity::*;
87
88// Reexport the error module for convenience.
89pub use self::error::ToWasmtimeResult;
90#[doc(inline)]
91pub use wasmtime_core::error;
92
93pub use wasmtime_core::{alloc::PanicOnOom, non_max, undo::Undo};
94
95// Only for use with `bindgen!`-generated code.
96#[doc(hidden)]
97#[cfg(feature = "anyhow")]
98pub use anyhow;
99
100/// Version number of this crate.
101pub const VERSION: &str = env!("CARGO_PKG_VERSION");