rust-windowing / rust-windowing/winit

Build is broken with default features disabled

Open
#3,174 17 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DS - wayland DS - x11 P - low
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

winit fails with errors including, but not limited to,

error: The platform you're compiling for is not supported by winit
  --> /home/ralith/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.2/src/platform_impl/mod.rs:67:1
   |
67 | compile_error!("The platform you're compiling for is not supported by winit");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

when built with default-features = false and no features enabled. This configuration is desirable for e.g. libraries that translate winit event types but which shouldn't have an opinion on enabled backends or configuration thereof.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

First reproduce the failure with default features disabled and no features enabled, then inspect winit-0.29.2/src/platform_impl/mod.rs around the reported compile_error. Trace how platform support is selected for this configuration. Done means that this build configuration compiles without the unsupported-platform error while preserving explicit backend configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.