Handcrafted Metal bindings for C#
Find a file
2024-12-28 02:29:27 +00:00
.github/workflows Bump version + Update workflows 2024-12-28 02:29:27 +00:00
src Bump version + Update workflows 2024-12-28 02:29:27 +00:00
xcode-capture/Capture/Capture.xcodeproj Example debug Xcode project 2024-03-16 20:22:35 -04:00
.editorconfig Workflow updates 2023-07-26 13:19:00 -04:00
.gitignore Ignore headers 2024-03-18 20:50:44 -04:00
LICENSE Create LICENSE 2023-05-25 08:47:03 -04:00
Package_README.md Package README 2024-03-18 12:45:17 -04:00
README.md Update README 2024-03-04 13:18:07 +00:00
SharpMetal.sln Fix solution 2023-07-28 08:25:48 -04:00

SharpMetal

Metal bindings for C#.

primitive

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