diff --git a/lib/codegen/src/lib.rs b/lib/codegen/src/lib.rs index ec924dc6bf..24c381a6eb 100644 --- a/lib/codegen/src/lib.rs +++ b/lib/codegen/src/lib.rs @@ -48,6 +48,8 @@ // Turns on no_std and alloc features if std is not available. #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(alloc))] +// TODO: Remove this workaround once https://github.com/rust-lang/rust/issues/27747 is done. +#![cfg_attr(not(feature = "std"), feature(slice_concat_ext))] #[cfg(not(feature = "std"))] #[macro_use] @@ -119,7 +121,7 @@ pub use result::{CodegenError, CodegenResult}; /// This replaces `std` in builds with `core`. #[cfg(not(feature = "std"))] mod std { - pub use alloc::{boxed, string, vec}; + pub use alloc::{boxed, slice, string, vec}; pub use core::*; pub mod collections { #[allow(unused_extern_crates)] diff --git a/lib/codegen/src/settings.rs b/lib/codegen/src/settings.rs index 3f7d684a87..cd135eba4b 100644 --- a/lib/codegen/src/settings.rs +++ b/lib/codegen/src/settings.rs @@ -25,6 +25,11 @@ use isa::TargetIsa; use std::boxed::Box; use std::fmt; use std::str; +use std::string::{String, ToString}; + +// TODO: Remove this workaround once https://github.com/rust-lang/rust/issues/27747 is done. +#[cfg(not(feature = "std"))] +use std::slice::SliceConcatExt; /// A string-based configurator for settings groups. /// diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 2469716d3c..d298060f76 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["webassembly", "wasm"] [dependencies] -wasmparser = { version = "0.19.0", default-features = false } +wasmparser = { version = "0.19.1", default-features = false } cranelift-codegen = { path = "../codegen", version = "0.22.0", default-features = false } cranelift-entity = { path = "../entity", version = "0.22.0", default-features = false } cranelift-frontend = { path = "../frontend", version = "0.22.0", default-features = false }