Skip to content

Conversation

@Berrysoft
Copy link
Member

Only for developers to create their own libs without default features.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces stub implementations to enable developers to create custom UI libraries without requiring default platform features. The changes allow the library to compile on any platform even when no UI backend (win32, winui, gtk, qt) is selected.

Key Changes:

  • Added complete stub module with implementations for all UI widgets that panic with "stub implementation" when called
  • Simplified platform-specific cfg attributes by introducing cfg_aliases for win32 and winui in build.rs
  • Updated CI workflows to test stub implementations and use newer macOS runners

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
winio/src/lib.rs Updated cfg logic to use stub module when no UI backend feature is enabled
winio/build.rs Added cfg_aliases for win32 and winui to simplify conditional compilation
winio/Cargo.toml Added cfg_aliases build dependency and winio-ui-windows-common dependency for Windows
winio/src/widgets/window.rs Simplified cfg attributes from all(windows, feature = "win32") to win32 alias
winio/src/widgets/label.rs Simplified cfg attributes using the new win32 alias
winio/src/stub/mod.rs Core stub module with Error, Result types and not_impl panic function
winio/src/stub/runtime.rs Stub Runtime implementation with new() and block_on() methods
winio/src/stub/ui/*.rs Complete stub implementations for all 22 UI widget types
winio-ui-windows-common/src/darkmode/mod.rs Added #[allow(unused)] to suppress warning for unused helper function
.github/workflows/test.yml Updated to test stub implementations and use macos-14 runners

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Berrysoft Berrysoft merged commit 7f680a3 into master Dec 5, 2025
16 checks passed
@Berrysoft Berrysoft deleted the dev/stub branch December 5, 2025 16:56
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.

2 participants