![]() |
VOOZH | about |
dotnet add package HexaGen --version 1.1.23.5
NuGet\Install-Package HexaGen -Version 1.1.23.5
<PackageReference Include="HexaGen" Version="1.1.23.5" />
<PackageVersion Include="HexaGen" Version="1.1.23.5" />Directory.Packages.props
<PackageReference Include="HexaGen" />Project file
paket add HexaGen --version 1.1.23.5
#r "nuget: HexaGen, 1.1.23.5"
#:package HexaGen@1.1.23.5
#addin nuget:?package=HexaGen&version=1.1.23.5Install as a Cake Addin
#tool nuget:?package=HexaGen&version=1.1.23.5Install as a Cake Tool
HexaGen is a comprehensive code generation toolkit for C# and C++ projects. It uses HexaGen.CppAst to parse C/C++ headers and automatically generates C# bindings and wrappers. HexaGen simplifies the process of integrating native libraries with C# applications by automating the creation of interop code.
Install HexaGen via NuGet Package Manager:
dotnet add package HexaGen
Clone the Repository:
git clone https://github.com/HexaEngine/HexaGen.git
cd HexaGen
Build the Project:
dotnet build
Create a configuration file (e.g., config.json):
{
"ApiName": "MyLibrary",
"Namespace": "MyLibrary.Generated",
"ImportType": "DllImport",
"GenerateExtensions": true
}
Generate C# bindings programmatically:
using HexaGen;
var config = CsCodeGeneratorConfig.Load("config.json");
var generator = new CsCodeGenerator(config);
generator.Generate("mylibrary.h", "Output");
HexaGen uses a JSON-based configuration system that supports:
Example configuration with inheritance:
{
"BaseConfig": {
"Url": "file://config.base.json",
"IgnoredProperties": ["IgnoredTypes"]
},
"ApiName": "MyAPI",
"Namespace": "MyAPI.Generated",
"ImportType": "LibraryImport"
}
For generating C wrappers around C++ libraries:
using HexaGen.Cpp2C;
var config = Cpp2CGeneratorConfig.Load("cpp2c-config.json");
var generator = new Cpp2CGenerator(config);
generator.Generate("mylibrary.hpp", "Output");
Contributions are welcome! Please:
HexaGen is licensed under the MIT License. See the file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.23.5 | 208 | 3/19/2026 |
| 1.1.23.3 | 105 | 3/19/2026 |
| 1.1.23 | 260 | 12/19/2025 |
| 1.1.22.1 | 245 | 12/19/2025 |
| 1.1.22 | 255 | 12/19/2025 |
| 1.1.20 | 169 | 11/1/2025 |
| 1.1.19 | 229 | 10/21/2025 |
| 1.1.15-rc30 | 321 | 3/3/2025 |
| 1.1.15-rc20 | 223 | 12/8/2024 |
| 1.1.14 | 248 | 11/4/2024 |
| 1.1.13 | 209 | 11/2/2024 |
| 1.1.12 | 202 | 11/2/2024 |
| 1.1.11 | 163 | 10/25/2024 |
| 1.1.10 | 426 | 10/24/2024 |
| 1.1.9 | 186 | 10/24/2024 |
| 1.1.9-rc3 | 174 | 10/14/2024 |
| 1.1.9-rc2 | 168 | 10/14/2024 |
| 1.1.9-rc11 | 187 | 10/17/2024 |
| 1.1.9-rc1 | 182 | 10/14/2024 |
| 1.1.8 | 206 | 10/13/2024 |