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