Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions CRATE_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,25 @@ We are open to well-reasoned [alternate algorithms][], but be aware
that any proposal would likely be expected to also provide the
majority of implementation work.

## I am a crate author and I want to control which features are available

When a crate is included in the playground, its Cargo.toml is
inspected for special metadata, similar to the [docs.rs
metadata][]. This will control what features we enable in addition to
the features needed by dependencies.

```toml
[package]
name = "test"

[package.metadata.playground]
default-features = true
features = ["std", "extra-traits"]
all-features = false
```

[prerelease]: https://semver.org/#spec-item-9
[all time downloads]: https://crates.io/crates?sort=downloads
[Rust cookbook]: https://rust-lang-nursery.github.io/rust-cookbook/
[alternate algorithms]: https://github.com/rust-lang/rust-playground/issues/101
[docs.rs metadata]: https://docs.rs/about/metadata
Loading