Path: blob/main/crates/environ/src/prelude.rs
3084 views
//! Rust module prelude for Wasmtime crates.1//!2//! Wasmtime crates that use `no_std` use `core::prelude::*` by default which3//! does not include `alloc`-related functionality such as `String` and `Vec`.4//! To have similar ergonomics to `std` and additionally group up some common5//! functionality this module is intended to be imported at the top of all6//! modules with:7//!8//! ```rust,ignore9//! use crate::*;10//! ```11//!12//! Externally for crates that depend on `wasmtime-environ` they should have this13//! in the root of the crate:14//!15//! ```rust,ignore16//! use wasmtime_environ::prelude;17//! ```18//!19//! and then `use crate::*` works as usual.2021pub use crate::collections::{EntitySet, TryNew, try_new};22pub use crate::error::{Context, Error, Result, bail, ensure, format_err};23pub use alloc::borrow::ToOwned;24pub use alloc::boxed::Box;25pub use alloc::format;26pub use alloc::string::{String, ToString};27pub use alloc::vec;28pub use alloc::vec::Vec;29pub use wasmparser::collections::{IndexMap, IndexSet};30pub use wasmtime_core::alloc::{TryCollect, TryExtend, TryFromIterator};313233