Ahwoo.BRUTAL.Interop 2026.10.1

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

Brutal Interop

Build

C/C++ parsing, AST representation, and layered interop code generation for the BRUTAL framework.

Brutal Interop provides the tools to parse C/C++ headers and generate managed ↔ native interop in a series of composable transformation steps. At the centre is Brutal.Ast: a language-neutral intermediate representation that models namespaces, types, fields, methods, expressions, and statements independently of any source language or output target. Brutal.Ast.CppAst populates that representation from C/C++ headers via libclang, and from there the AST can be walked and reshaped through as many stages as needed — for example, generating a C extern wrapper, then a C# PInvoke layer, then a user-facing C# API. Brutal.Interop provides the runtime handle and marshalling types consumed by generated code, while Brutal.Interop.NativeBuild integrates the CMake build of native libraries into the .NET build and pack pipeline.

Platform Support

  • Windows (x64)
  • Linux (x64)
  • macOS (Apple Silicon)

NuGet Packages

For Users

Prerequisites

Installation

To install the packages via NuGet, run the following commands in your project directory:

dotnet add package RocketWerkz.Brutal.Ast
dotnet add package RocketWerkz.Brutal.Ast.CppAst
dotnet add package Ahwoo.BRUTAL.Interop
dotnet add package RocketWerkz.Brutal.Interop.NativeBuild

The source generator packages are bundled with RocketWerkz.Brutal.Ast and Ahwoo.BRUTAL.Interop respectively and do not need to be installed separately.

Usage

Each module ships with a guided walkthrough next to its source — start at src/Brutal.Ast/README.md for the core IR, or jump straight to src/Brutal.Interop/README.md for the runtime handle pattern. The code samples on those pages are compiled and asserted at build time via RocketWerkz.Brutal.DocTest, so they stay in sync with the API.

samples/Brutal.Ast.Samples contains runnable end-to-end samples that demonstrate the full interop generation workflow:

  • AutoInterop — The core workflow: parses a C++ API, generates a C extern wrapper, a C# PInvoke layer, and a user-facing C# wrapper in one pass.
  • Comprehensive — Extends AutoInterop with custom AST manipulation and additional hand-written C# files, showing how auto-generated code can be augmented.
  • FullGeneration — Demonstrates standalone code generation without a native compilation step.
  • DocComments — Shows how C# doc comments can be authored using the DocComment tree
  • CMakeParser — Investigates cmake parsing with the intention of informing how code should be parsed for generation

AutoInterop, Comprehensive, FullGeneration, and CMakeParser compile native libraries at runtime and require CMake and a platform C++ toolchain to be available on PATH (MSVC on Windows, GCC on Linux, Xcode Command Line Tools on macOS). DocComments has no native compilation step. libclang itself is bundled with RocketWerkz.Brutal.Ast.CppAst and does not need to be installed separately.

Please refer to the BRUTAL Documentation for more detailed usage instructions and examples.

For Developers

Prerequisites

Compilation and Testing

To build the solution locally, run the following command in the repository root:

dotnet build

To run the tests, run the following command in the repository root:

dotnet test

Contributing

If you find a bug or have a feature request, please open an issue on GitHub. If you'd like to contribute code, feel free to fork the repository and submit a pull request.

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 (13)

Showing the top 5 NuGet packages that depend on Ahwoo.BRUTAL.Interop:

Package Downloads
Ahwoo.BRUTAL.ShaderC

Modern C# bindings for the shaderc API, a shader-compiling library.

Ahwoo.BRUTAL.Sdl

Modern C# bindings for SDL3, enabling cross-platform windowing, input, and multimedia.

Ahwoo.BRUTAL.RakNet

Modern C# bindings for the RakNet API, a low-level networking library.

Ahwoo.BRUTAL.OpenAl

Modern C# bindings for OpenAL (OpenAL Soft), for cross-platform 3D and streamed audio.

Ahwoo.BRUTAL.Jolt

Modern C# bindings for the Jolt Physics library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.10.1 3,141 10/15/2026

Builds with BrutalPackage.Sdk 2026.10.1 against the 2026.10.1 Brutal packages, so Brutal.T4 is no longer pulled in as a transitive dependency.

No public API changes.

**Full Changelog:** [v2026.10.0...v2026.10.1](https://github.com/RocketWerkz/brutal.interop/compare/v2026.10.0...v2026.10.1)