DotNetMD: A Swift library for reading and inspecting .NET metadata, including WinMD files, following the ECMA-335, Common Language Infrastructure (CLI) standard.
I work at The Browser Company supporting Swift on Windows for the Arc web browser. We have an internal code generator for Swift bindings to WinRT APIs on Windows based off the cppwinrt project in C++, which makes it a bit difficult to work with. For the last two months, I've been working on reimplementing it in Swift in my free time, starting with this library to read WinMD files.
The library has two layers:
- A higher layer that exposes .NET concepts, classes, members, etc., similar to
System.Reflection
. - A lower layer that reads metadata tables, similar to swift-winmd but using memory-mapping and loading things lazily.
At this point, it can enumerate most .NET entities and has tests against .NET 4.5's mscorlib.dll
as well as Windows.winmd
. I'm just starting on the WinRT projection in a separate SwiftWinRT project, and that will guide implementing future features in DotNetMD
.
This is also my first larger personal project written in Swift!