SharpSlang.Descs 2026210.0.0-beta.1

This is a prerelease version of SharpSlang.Descs.
dotnet add package SharpSlang.Descs --version 2026210.0.0-beta.1
                    
NuGet\Install-Package SharpSlang.Descs -Version 2026210.0.0-beta.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpSlang.Descs" Version="2026210.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpSlang.Descs" Version="2026210.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="SharpSlang.Descs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpSlang.Descs --version 2026210.0.0-beta.1
                    
#r "nuget: SharpSlang.Descs, 2026210.0.0-beta.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpSlang.Descs@2026210.0.0-beta.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpSlang.Descs&version=2026210.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SharpSlang.Descs&version=2026210.0.0-beta.1&prerelease
                    
Install as a Cake Tool

SharpSlang

C# bindings over the Slang shader compiler: compilation and full reflection, plus opt-in packages that bake a shader's code and reflection into one file and read it back without the compiler. Pure managed P/Invoke over a pinned Slang release. MIT licensed. Beta: the API may still change between releases. Each release pins one Slang release, and every package's major is that release as YYYYRRP (Slang v2026.21 is 2026210).

using SharpSlang;

using var global  = SlangGlobalSession.Create();
using var session = global.CreateSession(new SessionOptions { Targets = [new TargetOptions()] });
using var module  = session.LoadModule("standard_surface");
using var vertex  = module.FindEntryPoint("vertexMain");
using var pixel   = module.FindEntryPoint("fragmentMain");
using var program = session.Link(module, vertex, pixel);

byte[] spirv = program.GetEntryPointCodeBytes(0, targetIndex: 0);
Package What it is
SharpSlang the binding and Slang's native library, built from source with patches (Windows x64, Linux x64, Linux arm64; macOS arm64 as a zip on each GitHub release), with Slang's standard modules
SharpSlang.Descs Slang's enums, descriptor structs and interface layouts as plain types, generated from slang.h; no native code
SharpSlang.Pipeline reads baked shader packages and their reflection snapshot; no native code, so an application that loads baked shaders carries no compiler
SharpSlang.Pipeline.Bake the cooker: reflects a linked program into the snapshot and bakes code and layout into a package
SharpSlang.Pipeline.NRI projects the snapshot onto NRI's descs through SharpNRI.Descs, stored in the package at bake time
SharpSlang.Dxc build targets that copy dxcompiler.dll and dxil.dll from Microsoft's Microsoft.Direct3D.DXC at the pinned version, for DXIL on win-x64, and fail the build on another version; your restore takes Microsoft's package

The native library is not Slang's release binary. It is built from the pinned release's tag on GitHub's runners with the patches applied, each fixing one Slang defect and carrying Slang's own regression test; every defect, its report text and whether a patch fixes it are in docs/upstream.md. Where a patch applies, the library behaves differently from Slang's release. Each release attests the libraries it built: gh attestation verify <file> --repo Nullpoint56/SharpSlang on a library from the package, or on a .nupkg or zip from the GitHub release (nuget.org repository-signs the .nupkg it serves, which changes its digest).

An application that references SharpSlang gets Slang's licence texts and SharpSlang's own in licenses/SharpSlang/<rid>/ beside it (SharpSlangCopyLicenses=false turns that off). The packages declare trimming and Native AOT compatibility. .NET 11.

The guide covers compiling, reflecting, baking, the NRI projection, lifetime, threads, and the traps.

Repository · Releases · Third-party notices

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net11.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on SharpSlang.Descs:

Package Downloads
SharpSlang

C# bindings over the Slang shader compiler v2026.21: compilation and full reflection. Pure managed P/Invoke over a pinned Slang release; the major of the version is the Slang version as YYYYRRP. Native library inside for: Windows x64, Linux x64, Linux arm64.

SharpSlang.Pipeline

Reads what SharpSlang baked: shader package container, reflection snapshot, and SPIR-V module header. No native dependency: reference this from the application that loads baked packages, and leave the compiler and its per-platform payload in the asset pipeline.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026210.0.0-beta.1 0 11/22/2026