TedToolkit.CppBindings.Runtime 2026.9.15

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

TedToolkit.CppBindings.Runtime

Provider-neutral .NET 8 ownership and metadata contracts for generated C++ bindings. This package contains no native library, declaration catalog, OCCT dependency, or embedded analyzer.

Consume

These unreleased identities are built locally; no public feed availability is claimed. Generated wrapper projects reference this project/package. Handwritten applications normally acquire owners through their generated library's factories, not the generated-only constructors.

Opt into TedToolkit.CppBindings.Analyzers directly with PrivateAssets="all"; diagnostics do not flow through Runtime.

Capabilities

  • Owned<T>, constrained by unmanaged ICppRaii, contains one native RAII value directly in managed storage. Generated code placement-constructs that value and supplies its matching non-throwing cdecl void(T*) destructor. Disposal/finalization invokes it at most once; it does not free native storage or perform intrusive reference counting.
  • ICppOwner<T> exposes only non-owning ref T Value. It identifies the access contract for caller guidance and diagnostics; it supplies no acquisition, conversion, disposal, or shared generated handle-receiver API.
  • ICppRaii marks an eligible exact-layout unmanaged RAII representation; it owns no object.
  • NativeTypeNameAttribute preserves native type spelling as metadata.
  • GeneratedCodeOnlyAttribute identifies wrapper implementation hooks. It is suppressible compiler guidance, not an authorization boundary.
  • NativeError is the generated-only sequential carrier: one integer kind and three native diagnostic pointers. NativeErrorProjection copies and clears that carrier, then projects the fixed common kinds through INativeException: argument (1), range (2), arithmetic (3), invalid operation (4), null object (5), allocation (6), overflow (7), standard C++ (8), and unknown native failure (255). Provider runtimes supply only an optional factory for their local kinds.

All public types above use the TedToolkit.CppBindings namespace. OCCT intrusive handles and its local Standard_Failure interpretation belong to OCCT Runtime.

Lifetime and compatibility

Assigning an Owned<T> aliases the same owner; it never copies or clones the native object. Its returned reference remains subject to the native owner's lifetime and invalidation rules. Do not retain it past disposal or overlap access with disposal. Generated native calls pin the contained storage and keep the owner alive. Failed construction must suppress finalization.

The generator must prove layout/alignment and supply matching native construction/destruction. Runtime cannot infer a callback's module origin; its module must remain loaded through cleanup. There are no generated declarations, native imports, implicit borrowed-value copies, public Borrowed<T> wrappers, or module leases in this package.

Verify locally

From the repository root:

dotnet run --project tests/TedToolkit.CppBindings.Runtime.Tests/TedToolkit.CppBindings.Runtime.Tests.csproj -c Release -- --report-trx

The existing small Runtime suite covers both generic contracts and the separate OCCT Runtime; cross-wrapper/native fixtures remain separate consumers.

Repository overview · Platform architecture

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

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on TedToolkit.CppBindings.Runtime:

Package Downloads
TedToolkit.CppBindings.Occt.Runtime

OCCT intrusive ownership, borrowed handle layout, and native exception projection.

TedToolkit.CppBindings.Manifold.Runtime

Manifold native diagnostic ownership and exception contracts.

TedToolkit.CppBindings.Cgal.Runtime

CGAL failure, diagnostic ownership, and finite-result runtime contracts.

TedToolkit.CppBindings.Fcl.Runtime

FCL native diagnostic ownership and exception contracts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.9.15 0 9/15/2026
2026.9.14 31 9/14/2026