microsoft / microsoft/windows-rs
[win32metadata] Allow configuring RDL assembly identity
- Dominant language
- Rust
- Stars
- 12.8k
- Forks
- 665
- Avg merge
- 7h 9m
- Merged PRs (30d)
- 70
Description
## Summary
The RDL reader writes a WinMD with a fixed/default assembly identity. A caller generating a named metadata assembly needs to set its assembly name and four-part version.
## Standalone repro
Compile this RDL:
```rust
#[win32]
mod Test {
struct Value {
value: i32,
}
}
```
Configure the requested identity as `Contoso.Metadata`, version `1.2.3.4`, then reopen the emitted WinMD with `windows-metadata`. The assembly row should report that exact name and version.
Focused test:
`crates/tests/libs/rdl/tests/errors.rs::assembly_identity_can_be_configured`
## win32metadata impact
Header scraping succeeds, but the produced `Windows.Win32.winmd` has the wrong assembly identity. This is not a partition compilation blocker, but it prevents the Rust pipeline and the `Microsoft.Windows.WinmdGenerator` package from producing a compatible deliverable.
## Candidate fix
Expose assembly name/version on the RDL reader and pass them to the metadata writer.
Tested fix: https://github.com/jevansaks/windows-rs/commit/3355512fea66f9118299f070a43dd2ea7105b7f7
Contributor guide
Research direction
Start with crates/tests/libs/rdl/tests/errors.rs::assembly_identity_can_be_configured and run the focused test. Trace the RDL reader and metadata writer involved in producing the WinMD, then verify that configuring Contoso.Metadata with version 1.2.3.4 makes the reopened assembly row report that exact identity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100