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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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