From 06f4d5b8ff322e7d3f9d8fc2ca66d83807fe7b22 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Mon, 18 Mar 2024 12:45:17 -0400 Subject: [PATCH] Package README --- Package_README.md | 19 +++++++++++++++++++ src/SharpMetal/SharpMetal.csproj | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 Package_README.md diff --git a/Package_README.md b/Package_README.md new file mode 100644 index 0000000..d10c0f9 --- /dev/null +++ b/Package_README.md @@ -0,0 +1,19 @@ +## Why? + +The .NET ecosystem is very much lacking a good Metal binding package. Existing options are outdated or don't integrate well into cross-platform projects. This project aims to be a complete, up-to-date package that stays true to the original API while making the API easy to use and integrate into C#. + +## What can you make with it? + +Progress is underway to build a full set of working reimplementations of the metal-cpp samples. Thanks to the generator, the entire Metal API, from compute shaders to raytracing, should be available, although specific things may take further tweaking. + +## I want to contribute! + +Wonderful! SharpMetal is built with .NET 8.0, and follows a couple of specific guidelines: +- Block Namespaces +- Source Generated P/Invokes + - `LibraryImport` not `DllImport` +- Use C# types where possible + - `NSInteger` -> `long` + - `NSUInteger` -> `ulong` +- Mark structs and classes with `SupportedOSPlatform` attribute +- SharpMetal is built for macOS primarily, so when there are platform-specific differences, use the macOS option diff --git a/src/SharpMetal/SharpMetal.csproj b/src/SharpMetal/SharpMetal.csproj index 6b10d26..eaff77a 100644 --- a/src/SharpMetal/SharpMetal.csproj +++ b/src/SharpMetal/SharpMetal.csproj @@ -12,7 +12,7 @@ git Metal Graphics macOS MIT - README.md + Package_README.md SharpMetal Isaac Marovitz