Update no_std support.
This commit is contained in:
@@ -48,6 +48,8 @@
|
|||||||
// Turns on no_std and alloc features if std is not available.
|
// Turns on no_std and alloc features if std is not available.
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
#![cfg_attr(not(feature = "std"), feature(alloc))]
|
#![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"))]
|
#[cfg(not(feature = "std"))]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
@@ -119,7 +121,7 @@ pub use result::{CodegenError, CodegenResult};
|
|||||||
/// This replaces `std` in builds with `core`.
|
/// This replaces `std` in builds with `core`.
|
||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
mod std {
|
mod std {
|
||||||
pub use alloc::{boxed, string, vec};
|
pub use alloc::{boxed, slice, string, vec};
|
||||||
pub use core::*;
|
pub use core::*;
|
||||||
pub mod collections {
|
pub mod collections {
|
||||||
#[allow(unused_extern_crates)]
|
#[allow(unused_extern_crates)]
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ use isa::TargetIsa;
|
|||||||
use std::boxed::Box;
|
use std::boxed::Box;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::str;
|
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.
|
/// A string-based configurator for settings groups.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ readme = "README.md"
|
|||||||
keywords = ["webassembly", "wasm"]
|
keywords = ["webassembly", "wasm"]
|
||||||
|
|
||||||
[dependencies]
|
[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-codegen = { path = "../codegen", version = "0.22.0", default-features = false }
|
||||||
cranelift-entity = { path = "../entity", 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 }
|
cranelift-frontend = { path = "../frontend", version = "0.22.0", default-features = false }
|
||||||
|
|||||||
Reference in New Issue
Block a user