Skip to content

Commit 4cde654

Browse files
committed
add a std feature flag
For backwards compatibility this is not (yet) enabled by default. Will be used for all API's that require functionality provided by the rust stdlib.
1 parent 3fe8098 commit 4cde654

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ readme = "README.md"
1414
[features]
1515
default = ["atomic_append"]
1616
atomic_append = []
17+
std = []

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
Allows one to store a header struct and a vector all inline in the same memory on the heap and share weak versions for minimizing random lookups in data structures
44

55
If you use this without creating a weak ptr, it is safe. It is unsafe to create a weak pointer because you now have aliasing.
6+
7+
## Features
8+
9+
* `std`
10+
Enables API's that requires stdlib features. Provides more compatibility to `Vec`.
11+
This feature is not enabled by default.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![no_std]
1+
#![cfg_attr(not(feature = "std"), no_std)]
22

33
extern crate alloc;
44

0 commit comments

Comments
 (0)