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

Enable all mio features in Rust Playground #1290

Merged
merged 2 commits into from Mar 30, 2020

Conversation

peterjoel
Copy link
Contributor

Some common mio examples do not currently work in Rust playground (https://play.rust-lang.org/), because modules like net are not available with default features.

@Keruspe
Copy link
Contributor

Keruspe commented Mar 27, 2020

Shouldn't this be in the features section rather than in the examples one?

@peterjoel
Copy link
Contributor Author

Shouldn't this be in the features section rather than in the examples one?

Yes, indeed. I will change that.

@Thomasdezeeuw
Copy link
Collaborator

I have no idea if this would work or not, is there any documentation for the playground? Couldn't it just use --all-features? That would make it easier to maintain for us, compared to having to keep this feature up-to-date (enabling all other features).

@peterjoel
Copy link
Contributor Author

@Thomasdezeeuw
Copy link
Collaborator

Looking at rust-lang/rust-playground#192 (comment), could we do the following?

# Enable all features on the playground.
[package.metadata.playground]
all-features = true

Do we have any way to to test this, besides publishing a new version and trying?

@peterjoel
Copy link
Contributor Author

@Thomasdezeeuw I will have a go at building and running the playground locally.

@shepmaster
Copy link
Contributor

Couldn't it just use --all-features

In general, no, as it’s possible to have conflicting sets of features or features that require nightly. Of course, a crate can opt in to all features if it knows that’s feasible for itself.

Copy link
Contributor

@kleimkuhler kleimkuhler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @peterjoel! I think features can remain how it is without setting additional metadata.

Cargo.toml Outdated Show resolved Hide resolved
Co-Authored-By: Kevin Leimkuhler <kevin@kleimkuhler.com>
Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Thomasdezeeuw Thomasdezeeuw merged commit aaa243c into tokio-rs:master Mar 30, 2020
@Thomasdezeeuw
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants