llcppg [config-file]
If config-file
is not specified, a llcppg.cfg
file is used in current directory. The configuration file format is as follows:
{
"name": "inih",
"cflags": "$(pkg-config --cflags inireader)",
"include": [
"INIReader.h",
"AnotherHeaderFile.h"
],
"libs": "$(pkg-config --libs inireader)",
"trimPrefixes": ["Ini", "INI"],
"cplusplus":true
}
- llcppsymg: Generate symbol table for a C/C++ library
- Manually modify the desired Go symbols in symbol table
- llcppsigfetch: Fetch information of C/C++ symbols
- gogensig: Generate a go package by information of symbols
llcppsymg config-file
llcppsymg - # read config from stdin
It generates a symbol table file named llcppg.symb.json
. Its file format is as follows:
[
{
"mangle": "_ZN9INIReaderC1EPKcm",
"c++": "INIReader::INIReader(char const*, unsigned long)",
"go": "(*Reader).Init__0"
}
]
llcppsigfetch config-file
llcppsigfetch - # read config from stdin
It fetches information of C/C++ symbols and print to stdout. Its format is as follows:
[
{
"path": "/path/to/file.h",
"doc": {
"decls": [],
"macros": [],
"includes": [
{
"path": "incfile.h"
}
]
}
}
]
gogensig ast-file
gogensig - # read AST from stdin