purebind

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 9 Imported by: 0

README

purebind

purebind is a CLI tool that parses C-style header files and generates pure Go function bindings using purego.

see generated example

Features

  • Parses .h header files
  • Generates Go bindings using purego

Installation

go install github.com/sunaipa5/purebind@latest

Usage

purebind <project-name> <header-file-path>

Example:

purebind mylib ./mylib.h

This will generate:

mylib/
├── wrapper.go
└── lib.go

Example

Given a C header file:

int add(int a, int b);
void print_message(const char *msg);

The generated Go code will look like:

var (
	add func(int32, int32) int32
	print_message func(unsafe.Pointer)
)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL