Skip to content

Commit

Permalink
Build instructions in readme (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle authored Nov 23, 2024
1 parent d8efe73 commit 2569c8d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Swift library for reading and inspecting .NET metadata, including WinMD files, following the [ECMA-335, Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) standard. Parsing IL is currently out of scope, but not off the table in the future.

![example branch parameter](https://github.com/tristanlabelle/swift-dotnetmetadata/actions/workflows/build-and-test.yml/badge.svg?branch=main)
![Build and Test workflow](https://github.com/tristanlabelle/swift-dotnetmetadata/actions/workflows/build-and-test.yml/badge.svg?branch=main)

## Example

Expand Down Expand Up @@ -38,6 +38,24 @@ let package = Package(
)
```

## Building
Prerequisites:

- A Windows OS (building on other platforms should be possible but is untested)
- A Swift toolchain, version 5.8 or above
- Visual Studio (any edition) with the C++ Workload
- A Windows SDK (comes with Visual Studio)
- CMake and ninja (comes with Visual Studio, or use `winget install Kitware.CMake Ninja-build.Ninja`)

### In Visual Studio Code
Open Visual Studio Code from a `x64 Native Tools Command Prompt for VS 2022` and use standard IDE commands for building (<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>B</kbd>).

### From the command line
This project builds with both the Swift Package Manager (SPM) and CMake. SPM supports running tests, but requires a helper script because it cannot integrate all build steps.

1. Open a `x64 Native Tools Command Prompt for VS 2022`
2. Refer to the [Build and Test workflow](.github/workflows/build-and-test.yml) for build commands

## Architecture

The library consists in two layered modules:
Expand Down

0 comments on commit 2569c8d

Please sign in to comment.