Skip to content

Remove serde and webdriver from default features #67

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

Merged
merged 3 commits into from
Mar 23, 2025

Conversation

madsmtm
Copy link
Member

@madsmtm madsmtm commented Mar 10, 2025

I suspect most users will not want these enabled, but it's very easy to accidentally do so when depending on keyboard-types. Not that it's a big problem, because both deps are small and trusted, but it's still a bit annoying.

I've also enabled doc_auto_cfg to ensure that the docs on docs.rs make it clear that feature flags are required to enable these.

@madsmtm madsmtm force-pushed the remove-default-features branch from 4999723 to d6e95cc Compare March 10, 2025 13:59
To ensure that unicode-segmentation isn't a feature.
@@ -5,6 +5,7 @@
//! input in a cross-platform way.

#![warn(clippy::doc_markdown)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this line do?

Copy link
Member Author

Choose a reason for hiding this comment

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

The docsrs cfg is set by docs.rs when the docs are being built by them. They build using the nightly compiler, so we can use nightly features. Reference.

doc_auto_cfg is a useful nightly feature, which makes cfg(...) attributes show up in the documentation. It looks something like:

screenshot of docs.rs

See also the documentation for the feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, the screenshot explains it better than the documentation text.

@pyfisch pyfisch merged commit 7d2258e into rust-windowing:main Mar 23, 2025
3 checks passed
@madsmtm madsmtm deleted the remove-default-features branch March 23, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants