Remove std feature from cranelift-entity
This commit is contained in:
@@ -14,7 +14,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen-shared = { path = "./shared", version = "0.44.0" }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0" }
|
||||
cranelift-bforest = { path = "../cranelift-bforest", version = "0.44.0" }
|
||||
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||
failure_derive = { version = "0.1.1", default-features = false }
|
||||
@@ -37,10 +37,7 @@ default = ["std"]
|
||||
# The "std" feature enables use of libstd. The "core" feature enables use
|
||||
# of some minimal std-like replacement libraries. At least one of these two
|
||||
# features need to be enabled.
|
||||
std = [
|
||||
"cranelift-entity/std",
|
||||
"cranelift-codegen-meta/std"
|
||||
]
|
||||
std = ["cranelift-codegen-meta/std"]
|
||||
|
||||
# The "core" features enables use of "hashbrown" since core doesn't have
|
||||
# a HashMap implementation, and a workaround for Cargo #4866.
|
||||
|
||||
@@ -10,7 +10,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen-shared = { path = "../shared", version = "0.44.0" }
|
||||
cranelift-entity = { path = "../../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../../cranelift-entity", version = "0.44.0" }
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "experimental" }
|
||||
@@ -18,6 +18,6 @@ travis-ci = { repository = "CraneStation/cranelift" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["cranelift-entity/std"]
|
||||
std = []
|
||||
# The "core" feature enables a workaround for Cargo #4866.
|
||||
core = ["cranelift-entity/core"]
|
||||
core = []
|
||||
|
||||
@@ -15,9 +15,6 @@ edition = "2018"
|
||||
serde = { version = "1.0.94", features = ["derive"], optional = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = []
|
||||
core = []
|
||||
enable-serde = ["serde"]
|
||||
|
||||
[badges]
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::EntityRef;
|
||||
use core::marker::PhantomData;
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::slice;
|
||||
use std::boxed::Box;
|
||||
use alloc::boxed::Box;
|
||||
|
||||
/// A slice mapping `K -> V` allocating dense entity references.
|
||||
///
|
||||
@@ -141,7 +141,7 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::primary::PrimaryMap;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
// `EntityRef` impl for testing.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(feature = "std", deny(unstable_features))]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
@@ -52,12 +51,7 @@
|
||||
)]
|
||||
#![no_std]
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_use]
|
||||
extern crate alloc as std;
|
||||
#[cfg(feature = "std")]
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
extern crate alloc;
|
||||
|
||||
// Re-export core so that the macros works with both std and no_std crates
|
||||
#[doc(hidden)]
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::packed_option::ReservedValue;
|
||||
use crate::EntityRef;
|
||||
use core::marker::PhantomData;
|
||||
use core::mem;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A small list of entity references allocated from a pool.
|
||||
///
|
||||
|
||||
@@ -13,7 +13,7 @@ use serde::{
|
||||
ser::{SerializeSeq, Serializer},
|
||||
Deserialize, Serialize,
|
||||
};
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A mapping `K -> V` for densely indexed entity references.
|
||||
///
|
||||
@@ -222,7 +222,7 @@ where
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
use std::fmt;
|
||||
use alloc::fmt;
|
||||
struct SecondaryMapVisitor<K, V> {
|
||||
unused: PhantomData<fn(K) -> V>,
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ use core::ops::{Index, IndexMut};
|
||||
use core::slice;
|
||||
#[cfg(feature = "enable-serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::boxed::Box;
|
||||
use std::vec::Vec;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A primary mapping `K -> V` allocating dense entity references.
|
||||
///
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use crate::keys::Keys;
|
||||
use crate::EntityRef;
|
||||
use core::marker::PhantomData;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A set of `K` for densely indexed entity references.
|
||||
///
|
||||
|
||||
@@ -12,7 +12,7 @@ use crate::EntityRef;
|
||||
use core::mem;
|
||||
use core::slice;
|
||||
use core::u32;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Trait for extracting keys from values stored in a `SparseMap`.
|
||||
///
|
||||
|
||||
@@ -12,14 +12,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen = { path = "../cranelift-codegen", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0" }
|
||||
hashbrown = { version = "0.6", optional = true }
|
||||
failure = { version = "0.1.1", default-features = false }
|
||||
log = { version = "0.4.6", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["cranelift-codegen/std", "cranelift-entity/std"]
|
||||
std = ["cranelift-codegen/std"]
|
||||
core = ["hashbrown", "cranelift-codegen/core"]
|
||||
|
||||
[badges]
|
||||
|
||||
@@ -13,14 +13,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen = { path = "../cranelift-codegen", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0" }
|
||||
# This is commented out because it doesn't build on Rust 1.25.0, which
|
||||
# cranelift currently supports.
|
||||
# rustc_apfloat = { version = "0.1.2", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["cranelift-codegen/std", "cranelift-entity/std"]
|
||||
std = ["cranelift-codegen/std"]
|
||||
core = ["cranelift-codegen/core"]
|
||||
|
||||
[badges]
|
||||
|
||||
@@ -13,7 +13,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
wasmparser = { version = "0.39.1", default-features = false }
|
||||
cranelift-codegen = { path = "../cranelift-codegen", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0" }
|
||||
cranelift-frontend = { path = "../cranelift-frontend", version = "0.44.0", default-features = false }
|
||||
hashbrown = { version = "0.6", optional = true }
|
||||
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||
|
||||
Reference in New Issue
Block a user