-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.