Skip to content

[win32metadata] Allow configuring RDL assembly identity #4933

Description

@jevansaks

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:

#[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: jevansaks@3355512

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions