Novolis.CodeGen.Bindings.Roslyn 2026.1.2.53

dotnet add package Novolis.CodeGen.Bindings.Roslyn --version 2026.1.2.53
                    
NuGet\Install-Package Novolis.CodeGen.Bindings.Roslyn -Version 2026.1.2.53
                    
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="Novolis.CodeGen.Bindings.Roslyn" Version="2026.1.2.53" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Novolis.CodeGen.Bindings.Roslyn" Version="2026.1.2.53" />
                    
Directory.Packages.props
<PackageReference Include="Novolis.CodeGen.Bindings.Roslyn" />
                    
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 Novolis.CodeGen.Bindings.Roslyn --version 2026.1.2.53
                    
#r "nuget: Novolis.CodeGen.Bindings.Roslyn, 2026.1.2.53"
                    
#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 Novolis.CodeGen.Bindings.Roslyn@2026.1.2.53
                    
#: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=Novolis.CodeGen.Bindings.Roslyn&version=2026.1.2.53
                    
Install as a Cake Addin
#tool nuget:?package=Novolis.CodeGen.Bindings.Roslyn&version=2026.1.2.53
                    
Install as a Cake Tool

Novolis

Novolis · Docs · Source

Novolis.CodeGen.Bindings.Roslyn

Roslyn hook host, default binding-job runner, emit writer, and structural compilation-unit comparison for C-ABI binding codegen.

Install

dotnet add package Novolis.CodeGen.Bindings.Roslyn

Prerequisites: .NET 10 SDK (net10.0).

Quick start (no hooks)

Most C libraries only need typed manifests and jobs — no phase enum and no CreateContext plumbing:

using Novolis.CodeGen.Bindings;
using Novolis.CodeGen.Bindings.Roslyn;

var options = BindingCodegenOptions.Physical(
    repoRoot,
    manifests,
    "dotnet run --project My.CodeGen -- generate");

var project = BindingProject.Create("MyLib")
    .AddJob(BindingEmitJob.LibraryImport(
        "interop",
        fragmentId: "mylib",
        className: "MyLibNative",
        relativePath: "src/MyLib.Bindings/Interop/MyLibNative.g.cs",
        namespaceName: "MyLib.Interop",
        assemblyName: "MyLib.Bindings",
        libraryConstantName: "MyLibDll"))
    .AddJob(BindingEmitJob.FacadeForward(
        "facade",
        fragmentId: "facades",
        typeName: "AudioDevice",
        relativePath: "src/MyLib.Runtime/Audio/AudioDevice.g.cs",
        namespaceName: "MyLib",
        assemblyName: "MyLib.Runtime",
        facadeMethodImpl: "AggressiveInlining"));

var exit = BindingCodegen.Generate(project, options);

See the TinyExpr lab for a complete tiny consumer: d:\novolis\novolis-lab\labs\codegen\TinyExprBindings\.

Custom phases and hooks

Raylib-style consumers that rewrite syntax after emit still use the generic host:

var exit = new BindingCodegenHost<MyPhase, MyContext>().Generate(
    new BindingCodegenRun<MyPhase, MyContext>
    {
        Project = project,
        Options = options,
        SelectPhase = job => MyPhase.Emit,
        CreateContext = (job, fragment, outputPath, fingerprint) =>
            new MyContext
            {
                Environment = options.Environment,
                OutputPath = outputPath,
                Fragment = fragment,
                ManifestSha256 = fingerprint,
                RegenerateHint = options.RegenerateHint,
            },
        Hooks = HookDiscovery.Discover<MyPhase, MyContext>(typeof(MyEndDrawingHook).Assembly),
    });

Jobs own their source-format policy: RoslynFormatter for interop, shims, and debug output; NormalizeWhitespace for façade forwards (applied automatically by BindingEmitJob.FacadeForward). Use CompilationUnitComparer.AreStructurallyEquivalent for T1 parity gates between committed and emitted source.

Package When to use
Novolis.CodeGen.Bindings Manifest fragments, BindingEmitJob factories, and emit orchestration

More documentation

Support

Pre-release platform library. Depends on Microsoft.CodeAnalysis.CSharp.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.1.2.53 81 10/18/2026
2026.1.2.51 98 10/18/2026
2026.1.2.50 96 10/4/2026
2026.1.2.49 96 10/4/2026
2026.1.2.48 112 10/1/2026
2026.1.2.47 95 9/30/2026