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 graphs; 21 pub mod prelude; 22 23 mod address_map; 24 mod frame_table; 25 #[macro_use] 26 mod builtin; 27 mod demangling; 28 mod ext; 29 mod gc; 30 mod hostcall; 31 mod key; 32 mod module; 33 mod module_artifacts; 34 mod module_types; 35 pub mod obj; 36 mod ref_bits; 37 mod scopevec; 38 mod stack_map; 39 mod stack_switching; 40 mod string_pool; 41 mod trap_encoding; 42 mod tunables; 43 mod types; 44 mod vmoffsets; 45 mod wasm_error; 46 47 pub use self::ext::*; 48 pub use crate::address_map::*; 49 pub use crate::builtin::*; 50 pub use crate::demangling::*; 51 pub use crate::frame_table::*; 52 pub use crate::gc::*; 53 pub use crate::hostcall::*; 54 pub use crate::key::*; 55 pub use crate::module::*; 56 pub use crate::module_artifacts::*; 57 pub use crate::module_types::*; 58 pub use crate::ref_bits::*; 59 pub use crate::scopevec::ScopeVec; 60 pub use crate::stack_map::*; 61 pub use crate::stack_switching::*; 62 pub use crate::string_pool::{Atom, StringPool}; 63 pub use crate::trap_encoding::*; 64 pub use crate::tunables::*; 65 pub use crate::types::*; 66 pub use crate::vmoffsets::*; 67 pub use crate::wasm_error::*; 68 pub use object; 69 70 pub use wasmparser; 71 72 #[cfg(feature = "compile")] 73 mod compile; 74 #[cfg(feature = "compile")] 75 pub use crate::compile::*; 76 77 #[cfg(feature = "component-model")] 78 pub mod component; 79 #[cfg(all(feature = "component-model", feature = "compile"))] 80 pub 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. 85 pub use cranelift_entity::*; 86 87 // Reexport the error module for convenience. 88 pub use self::error::ToWasmtimeResult; 89 #[doc(inline)] 90 pub use wasmtime_core::error; 91 92 pub use wasmtime_core::{alloc::PanicOnOom, non_max, undo::Undo}; 93 94 // Only for use with `bindgen!`-generated code. 95 #[doc(hidden)] 96 #[cfg(feature = "anyhow")] 97 pub use anyhow; 98 99 /// Version number of this crate. 100 pub const VERSION: &str = env!("CARGO_PKG_VERSION"); 101