Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sobind

Generates So extern declarations from C header files.

sobind parses .h files and emits a Go source file with //so:extern stubs for structs, constants, function pointer typedefs, and function declarations.

Note that sobind is far from finished and can't handle many situations correctly. It's still useful, but you should treat the generated file as a starting point, not as the final result.

Install

go install solod.dev/sobind@latest

Usage

sobind [-o output.go] [-pkg name] <header.h | dir> ...
  • -o - output file (default: stdout)
  • -pkg - Go package name (default: main)

When given a directory, all .h files in it are processed.

Example

sobind -pkg main -o sqlite3.go sqlite3.h

About

Generate So extern declarations from C headers

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages