odin-blend2d

Odin bindings to Blend2D
Log | Files | Refs | README | LICENSE

commit b9e6995862aa6b609f7f7e1af138346e6bcc566f
parent 1b6179d43face34f0e34aafb7316e9d2edd4f111
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Sat, 25 Oct 2025 23:20:23 -0300

bindgen: add necessary configuration

Diffstat:
Mbindgen.sjson | 24++++++++++++++++++------
Aimports.inc | 7+++++++
2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/bindgen.sjson b/bindgen.sjson @@ -1,10 +1,22 @@ -clang_include_paths = [ - "blend2d/src" +inputs = [ + ".headers" ] +remove = [ + // The version macro doesn't translate. + "BL_VERSION" +] + +type_overrides = { + // BLRuntimeContext contains cpp fields that don't translate. + "BLRuntimeContext" = "struct{}" +} + +remove_type_prefix = "BL" +remove_function_prefix = "bl_" +remove_macro_prefix = "BL_" -// Writes the clang JSON ast dump for debug inspection (in output folder) -debug_dump_json_ast = true +output_folder = "binding" +package_name = "blend2d" -// Writes the clang preprocessor macro dump -debug_dump_macros = true +imports_file = "imports.inc" diff --git a/imports.inc b/imports.inc @@ -0,0 +1,7 @@ +when ODIN_OS == .Windows { + foreign import lib "blend2d.lib" +} else when ODIN_OS == .Darwin { + foreign import lib "libblend2d.a" +} else when ODIN_OS == .Linux { + foreign import lib "libblend2d.a" +}