Skip to content

windows-core switch to minimal bindings#4605

Merged
kennykerr merged 9 commits into
masterfrom
more-bindings
Jun 18, 2026
Merged

windows-core switch to minimal bindings#4605
kennykerr merged 9 commits into
masterfrom
more-bindings

Conversation

@kennykerr

@kennykerr kennykerr commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator
  1. Core bindings merge: merged core.txt + core_com.txt, #[allow(dead_code)] on bindings module for Linux
  2. Warnings removal: deleted Warnings/WarningBuilder, changed bindgen()/write() to return (), removed .unwrap() from ~50 callers, deleted 2 error fixtures, updated docs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the windows-core / windows-bindgen pipeline to use minimal bindings, and removes the warnings-returning API so bindgen entrypoints now return () and callers no longer .unwrap().

Changes:

  • Switch windows-core bindings generation to --minimal and merge core/core_com inputs.
  • Remove the Warnings/WarningBuilder API and update bindgen() / write() call sites accordingly.
  • Update docs, samples, and tests to match the new bindgen API and warning behavior.

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/time.md Update example to match bindgen() returning ().
docs/bindgen.md Update examples/docs for new bindgen API and warning behavior.
crates/tools/reactor/src/main.rs Stop assigning bindgen result (now ()).
crates/tools/package/src/main.rs Stop assigning bindgen result (now ()).
crates/tools/bindings/src/main.rs Remove .unwrap() and remove separate core_com run.
crates/tools/bindings/src/core.txt Switch windows-core generation to --minimal and merge filters.
crates/tools/bindings/src/core_com.txt Remove separate COM bindings input (merged into core.txt).
crates/tests/winrt/reference/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/reference_windows/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/reference_no_windows/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/reference_no_deps/build.rs Stop assigning bindgen result (now ()).
crates/tests/winrt/reference_float/build.rs Stop assigning bindgen result (now ()).
crates/tests/winrt/reference_custom/build.rs Stop assigning bindgen result (now ()).
crates/tests/winrt/reference_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/ref_params/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/overloads/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/overloads_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/noexcept/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/events/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/events_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/constructors/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/constructors_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/composable/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/composable_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/composable_aggregation/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/collection_interop/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/activation/build.rs Remove .unwrap() from bindgen call.
crates/tests/winrt/activation_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/misc/just_core/build.rs Remove .unwrap() from bindgen call.
crates/tests/misc/component/build.rs Remove .unwrap() from bindgen call.
crates/tests/misc/component_client/build.rs Remove .unwrap() from bindgen call.
crates/tests/libs/reference/build.rs Remove .unwrap() from bindgen call.
crates/tests/libs/rdl/tests/struct_values.rs Remove .unwrap() from bindgen call.
crates/tests/libs/rdl/tests/struct_fields.rs Remove .unwrap() from bindgen call.
crates/tests/libs/rdl/tests/fn_abi.rs Remove .unwrap() from bindgen call.
crates/tests/libs/bindgen/tests/fixtures.rs Update fixtures to new bindgen/write behavior (no warnings object).
crates/tests/libs/bindgen/data/error/bindgen_skip/fixture.toml Remove warning-based error fixture (warnings removed).
crates/tests/libs/bindgen/data/error/bindgen_skip/expected.err Remove warning-based expected output.
crates/tests/libs/bindgen/data/error/bindgen_skip_cpp/fixture.toml Remove warning-based error fixture (warnings removed).
crates/tests/libs/bindgen/data/error/bindgen_skip_cpp/expected.err Remove warning-based expected output.
crates/samples/windows/xaml_app/build.rs Stop assigning builder result (now ()).
crates/samples/windows/webview/build.rs Remove .unwrap() from .write().
crates/samples/services/time/build.rs Remove .unwrap() from .write().
crates/samples/robot/component/build.rs Remove .unwrap() from .write().
crates/samples/robot/client/build.rs Remove .unwrap() from .write().
crates/samples/json/json_validator_winrt/build.rs Remove .unwrap() from .write().
crates/samples/json/json_validator_winrt_client/build.rs Remove .unwrap() from .write().
crates/samples/canvas/standalone/build.rs Remove .unwrap() from .write().
crates/libs/core/src/lib.rs Adjust crate-level clippy expectations.
crates/libs/core/src/imp/mod.rs Remove separate COM bindings module; re-export merged bindings.
crates/libs/core/src/imp/factory_cache.rs Update to new minimal binding signatures/return handling.
crates/libs/core/src/imp/com_bindings.rs Remove generated COM bindings file (merged into bindings.rs).
crates/libs/core/src/imp/bindings.rs Update generated bindings output for --minimal.
crates/libs/core/src/imp/agile.rs Update RoGetAgileReference call to match new signature/output handling.
crates/libs/core/src/guid.rs Update UUID creation success handling for RPC_STATUS.
crates/libs/bindgen/src/winmd/mod.rs Remove now-unused MemberRefParentExt.
crates/libs/bindgen/src/warnings.rs Remove warnings implementation (API removed).
crates/libs/bindgen/src/types/interface.rs Remove warning emission for skipped methods/impl-traits.
crates/libs/bindgen/src/types/cpp_interface.rs Remove warning emission for skipped methods/impl-traits.
crates/libs/bindgen/src/type_map.rs Remove unused TypeMap::remove.
crates/libs/bindgen/src/lib.rs Remove warnings module; change write() to return ().
crates/libs/bindgen/src/format.rs Change rustfmt failure handling (now panics).
crates/libs/bindgen/src/filter.rs Remove filter warning collection.
crates/libs/bindgen/src/config.rs Remove warnings handle from Config.
crates/libs/bindgen/src/cli.rs Change bindgen() to return () and update docs.
crates/libs/bindgen/readme.md Update README example for new bindgen API.

Comment on lines +6 to +8
let formatted = self
.rustfmt(tokens)
.unwrap_or_else(|| panic!("failed to format output with `rustfmt`"));

pub use agile::*;
pub(crate) use bindings::*;
pub use bindings::*;
Comment on lines +27 to +29
// RPC_S_UUID_LOCAL_ONLY (1824) indicates a locally-generated UUID,
// which is fine for our purposes.
if result.is_ok() || result == RPC_STATUS(1824) {
@kennykerr kennykerr merged commit ae790fd into master Jun 18, 2026
28 checks passed
@kennykerr kennykerr deleted the more-bindings branch June 18, 2026 01:05
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