Update to riddle and metadata generation #2510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's another update as I continue to work toward #1093.
Metadata generation requires a stricter metadata reader that more accurately captures type information in a lossless manner rather than just capturing what I happen to need for the
windows
crate. To that end, this update brings another batch of small improvements to the reader.I have also switched the
windows-metadata
crate to use standalone code generation for its internal definitions to ease maintenance and improve clarity. Many numeric literals have been replaced by generated constants.The standalone code generation functions will now assert if they can't find the requested type, constant, or function.
Finally, riddle and metadata generation still have a long way to go but this update is the first to support pretty rich metadata generation of both WinRT and Win32 metadata. It's not quite ready to kick the tires but it's getting close!
This update also deals with a few new warnings raised by the latest Rust toolchain updates.