AaronRobinsonMSFT / DNMD

Reimplementation of ECMA-335 metadata APIs
MIT License
16 stars 3 forks source link

.NET MetaData – DNMD

DNMD represents a suites of tools for manipulating ECMA-335 defined metadata. It designed to be written in unmanaged code (that is, C/C++) in a modern style. This doesn't mean it is intended to rely on the latest features or libraries. Rather it is written to use canonical C and C++ in a manner that is clear.

DNMD provides the following tools:

The primary goal of DNMD is to explore the benefits of a rewrite of the metadata APIs found in dotnet/runtime. The rewrite has the following constraints:

Requirements (minimum)

Build

git submodule update --init --recursive

cmake -S . -B artifacts

cmake --build artifacts --target install

Test

The test/ directory contains all product tests. The native components for DNMD should be built first. See the Build section.

The DNMD.Tests.sln file can be loaded in Visual Studio to run associated tests. The managed tests will use the latest build of the DNMD libraries. Keep in mind the native assets are built with a configuration independent of the tests.

Testing correctness defers to the current implementation of the relevant interface defined in the .NET runtime the test is running on (for example, IMetaDataImport). The approach is to pass identical arguments to the current implementation and the implementation in this repo. The return argument and all out arguments are then compared for equality. In some cases pointers are returned so the pointer is dereferenced and then hashed.

Additional Resources

ECMA-335 specification