BGCS.Runtime 2.0.4

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

BGCS.Runtime

BGCS.Runtime is the small runtime library consumed by BindGen-CS generated bindings. Install it in the application or library that compiles generated C# code; generator-only projects normally do not need a direct reference.

Install

dotnet add package BGCS.Runtime

The package provides:

  • Pointer<T>, ConstPointer<T>, Bool8, Bool32, and Atomic<T>;
  • callback lifetime support through NativeCallback<T> and NativeCallbackRegistry<TKey,TDelegate>;
  • INativeContext, NativeLibraryContext, and function-table loading;
  • cross-platform native-library resolution and load interception;
  • allocation, pointer, array, UTF-8, and UTF-16 helpers used by generated code;
  • native-name and source-location metadata attributes.

Runtime deployment modes

The default BindGen-CS configuration emits bindings that reference this NuGet package.

For source-only distribution, set GenerateRuntimeSource=true; generation then writes a guarded standalone Runtime.cs. Do not compile both copies of the Runtime types. If a project intentionally contains generated Runtime source and also references this package, define BGCS_RUNTIME_EXTERNAL so the generated copy is excluded.

BGCS.Runtime helps locate and invoke native code, but it does not build or distribute the native shared library. The consuming application remains responsible for placing the correct library for each runtime identifier and architecture.

Documentation

BindGen-CS is licensed under the MIT License. Portions derived from CppAst/HexaGen retain their original notices.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net9.0

    • No dependencies.

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
2.0.4 50 9/26/2026
2.0.3 51 9/25/2026
1.0.1 142 4/9/2026
1.0.0 112 4/9/2026
1.0.0-alpha.1 75 4/6/2026
0.1.0 120 4/5/2026