Skip to content

Commit

Permalink
CHANGE: make the std feature default (breaks no_std)
Browse files Browse the repository at this point in the history
Software that uses this crate in a no_std environment will now have to clear the `std` flag
manually.

Rationale:

Creating documentation and testing things that require `std` would require a lot conditional
compilation tricks. Things would easily go under the Radar when buildiong doc and running
tests with `no_std` being the default.

Most users likely expect the `std` feature to be enabled by default.

Still if it this is a problem we can keep `no_std` being the default with some effort.
  • Loading branch information
cehteh committed Jan 30, 2025
1 parent d8c717e commit efc96c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = "MIT"
readme = "README.md"

[features]
default = ["atomic_append"]
atomic_append = []
default = ["std", "atomic_append"]
std = []
atomic_append = []

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ If you use this without creating a weak ptr, it is safe. It is unsafe to create

* `std`
Enables API's that requires stdlib features. Provides more compatibility to `Vec`.
This feature is not enabled by default.
This feature is enabled by default.
* `atomic_append`
Enables the `atomic_push` API's that allows extending a `HeaderVec` with interior
mutability from a single thread by a immutable handle.
This feature is enabled by default.

0 comments on commit efc96c0

Please sign in to comment.