Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all default features. Making them opt-in #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading