Skip to content

Commit 80807ea

Browse files
authored
Merge pull request #1134 from rust-lang/maint
Maintenance
2 parents 6c27f28 + 2b013d1 commit 80807ea

File tree

10 files changed

+625
-429
lines changed

10 files changed

+625
-429
lines changed

CRATE_POLICY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,25 @@ We are open to well-reasoned [alternate algorithms][], but be aware
4747
that any proposal would likely be expected to also provide the
4848
majority of implementation work.
4949

50+
## I am a crate author and I want to control which features are available
51+
52+
When a crate is included in the playground, its Cargo.toml is
53+
inspected for special metadata, similar to the [docs.rs
54+
metadata][]. This will control what features we enable in addition to
55+
the features needed by dependencies.
56+
57+
```toml
58+
[package]
59+
name = "test"
60+
61+
[package.metadata.playground]
62+
default-features = true
63+
features = ["std", "extra-traits"]
64+
all-features = false
65+
```
66+
5067
[prerelease]: https://semver.org/#spec-item-9
5168
[all time downloads]: https://crates.io/crates?sort=downloads
5269
[Rust cookbook]: https://rust-lang-nursery.github.io/rust-cookbook/
5370
[alternate algorithms]: https://github.com/rust-lang/rust-playground/issues/101
71+
[docs.rs metadata]: https://docs.rs/about/metadata

0 commit comments

Comments
 (0)