![]() |
VOOZH | about |
dotnet add package HexaGen.Core --version 1.1.11.2
NuGet\Install-Package HexaGen.Core -Version 1.1.11.2
<PackageReference Include="HexaGen.Core" Version="1.1.11.2" />
<PackageVersion Include="HexaGen.Core" Version="1.1.11.2" />Directory.Packages.props
<PackageReference Include="HexaGen.Core" />Project file
paket add HexaGen.Core --version 1.1.11.2
#r "nuget: HexaGen.Core, 1.1.11.2"
#:package HexaGen.Core@1.1.11.2
#addin nuget:?package=HexaGen.Core&version=1.1.11.2Install as a Cake Addin
#tool nuget:?package=HexaGen.Core&version=1.1.11.2Install 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. |
Showing the top 4 NuGet packages that depend on HexaGen.Core:
| Package | Downloads |
|---|---|
|
HexaGen
HexaGen is a code generation toolkit for C++ and C# projects. |
|
|
HexaGen.Language
HexaGen.Language provides language parsing and analysis features for the HexaGen code generation toolkit. |
|
|
HexaGen.Legacy
Package Description |
|
|
HexaGen.Automation
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.1.11.2 | 221 | 3/19/2026 | |
| 1.1.11 | 293 | 12/19/2025 | |
| 1.1.10 | 283 | 12/19/2025 | |
| 1.1.9 | 333 | 11/1/2025 | |
| 1.1.8 | 245 | 10/21/2025 | |
| 1.1.7-rc4 | 336 | 3/3/2025 | |
| 1.1.7-rc2 | 236 | 12/8/2024 | |
| 1.1.6 | 307 | 11/4/2024 | |
| 1.1.6-rc0 | 177 | 11/4/2024 | |
| 1.1.5 | 241 | 11/2/2024 | |
| 1.1.4.2 | 556 | 7/19/2025 | |
| 1.1.4.1 | 242 | 7/15/2025 | |
| 1.1.4 | 731 | 10/24/2024 | |
| 1.1.3 | 215 | 10/24/2024 | |
| 1.1.3-unstable | 224 | 9/6/2024 | |
| 1.1.3-rc0 | 199 | 10/17/2024 | |
| 1.1.2 | 991 | 8/18/2024 | |
| 1.1.1 | 272 | 8/16/2024 | |
| 1.1.0 | 288 | 8/16/2024 | 1.1.0 is deprecated because it has critical bugs. |
| 1.0.1 | 235 | 8/14/2024 |