Skip to content

Commit

Permalink
breaking: Add std and alloc features
Browse files Browse the repository at this point in the history
These features do nothing and raise a compiler error if disabled. However this
enables us to disable these features in the future.

Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Jun 9, 2024
1 parent 0511533 commit 2fe146a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ harness = false
name = "broadcast_bench"

[features]
default = ["std"]
alloc = []
std = ["alloc"]

[dependencies]
event-listener = "5.0.0"
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
html_logo_url = "https://raw.githubusercontent.com/smol-rs/smol/master/assets/images/logo_fullsize_transparent.png"
)]

#[cfg(any(not(feature = "std"), not(feature = "alloc"),))]
compile_error! { "async-broadcast requires the 'std' and 'alloc' features to be enabled" }

#[cfg(doctest)]
mod doctests {
doc_comment::doctest!("../README.md");
Expand Down

0 comments on commit 2fe146a

Please sign in to comment.