Skip to content

Too big #1

@ericsink

Description

@ericsink

The generator has an ugly config setting where I can declare which methods I want to call, and it outputs only those methods plus anything they require. Currently, the config is setup to include everything needed by the 3 samples here, and not much else.

The reason why is because if I generate the entire WinRT API surface, swift build cannot cope with it because of the size.

One problem is that the resulting library exceeds the Windows limit of 65535 exported symbols.

Another issue is that if I break things up into one file per namespace, the resulting swiftc invocation exceeds the 32KB limit for a command line, and if I put everything in one file, the build takes a lot longer. Like, hours.

Currently, the input to the generator is the Windows.winmd file found in the UnionMetadata directory of the Windows SDK.

It is challenging to find a clean way to break things up into pieces. Constraining things by namespace reveals circular dependencies.

The Rust/WinRT project uses #ifdefs (actually "features", the Rust equivalent of same) to constrain the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions