Skip to content

Commit

Permalink
Remove all default features. Making them opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Feb 4, 2025
1 parent dcd3525 commit a4098c4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ edition = "2021"
rust-version = "1.60.0"

[features]
# TODO: Remove the default features on next breaking release and make them opt-in.
# Because default features are evil
default = ["std", "async"]
# None of the features are on by default, by design. Default features is an anti-pattern.
# Since most people pull in dependencies without carefully inspecting the dependency or
# feature list, they accidentally pull in unnecessary complexity and sometimes even
# dependencies. By making everything opt-in, we avoid this problem. Opting in to a feature
# is so simple in Cargo anyway, and makes it more explicit what functionality it uses.
default = []

# Enables usage of libstd. Adds support for thread blocking receive methods.
std = []
Expand Down

0 comments on commit a4098c4

Please sign in to comment.