Skip to content

Commit

Permalink
build: mark no_std as legacy feature flag
Browse files Browse the repository at this point in the history
The `no_std` feature flag has no effect, anymore (as already documented
in `README.md`). Document this in `Cargo.toml`, but retain it for
backwards compatibility.

Note that for better cross-package composability, an `std` flag would
likely be preferred in the future, over a `no_std` flag. The former
allows multiple packages with different preferences on this feature to
be combined in a single build, while the latter does not.

Hence, suggest that `no_std` as feature flag is a legacy compatibility
flag, and will not be used in the future.
  • Loading branch information
dvdhrm committed Apr 9, 2024
1 parent 9c62534 commit 10a8b02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ compiler_builtins = { version = "0.1", optional = true }

[features]
default = []
no_std = []
bench = []
rustc-dep-of-std = ['std', 'core', 'compiler_builtins']

# Legacy, now a no-op
no_std = []

0 comments on commit 10a8b02

Please sign in to comment.