Releases: goplus/llcppg
v0.8.0
🚀 LLGo-Native End-to-End Pipeline
- From C header parsing to LLGo binding generation, the entire workflow is now
compiled and executed by LLGo. - For normal usage, one LLGo-built llcppg binary is enough to run the full
package-generation workflow.
What Changed
- The generation workflow is consolidated behind
llcppgas the main entrypoint, instead of relying on externally chained tools in normal runs. - Core pipeline stages (symbol handling, header parsing, and codegen orchestration) are aligned with the LLGo compilation path.
- Installation docs are updated to separate required setup from optional debug tooling.
Related PR
- refactor(convert): preload dependency dirs via go list by @luoliwoshang in #650
- feat: compile llcppg with llgo and inline toolchain by @luoliwoshang in #653
- docs: clarify llgo main-branch install requirements by @luoliwoshang in #655
- docs: refine README install flow and devtool section by @luoliwoshang in #656
Requirements
- This version depends on recent LLGo capabilities.
- Please use an LLGo build from the
mainbranch.
Full Changelog: v0.7.8...v0.8.0
v0.7.8
What's Changed
- feat: upgrade gogen and use custom go printer output & fix some newline before decl by @luoliwoshang in #641
fixed type's doc have unexpect newline
/* The cJSON structure: */
-
type JSON struct {
Next *JSON
Prev *JSONcl
- convert: lazily create ConstGroup in createEnumItems to avoid empty const nodes by @xgopilot[bot] in #644
deps
- build(deps): bump github.com/qiniu/x from 1.15.3 to 1.16.0 by @dependabot[bot] in #617
- build(deps): bump github.com/goplus/mod from 0.18.0 to 0.19.0 by @dependabot[bot] in #616
- build(deps): bump github.com/goplus/mod from 0.19.0 to 0.19.1 by @dependabot[bot] in #629
- build(deps): bump github.com/goplus/llgo from 0.12.0 to 0.12.1 by @dependabot[bot] in #624
- build(deps): update CI and setup to use llgo v0.12.1 by @xgopilot[bot] in #646
ai
- chore: add xgopilot config to use claude-4.5-opus model by @xgopilot[bot] in #620
- chore: update xgopilot to use claude-4.6-opus model by @xgopilot[bot] in #633
- docs: update CLAUDE.md to instruct AI to run install.sh and TestFromTestdata locally by @xgopilot[bot] in #639
docs
test
Full Changelog: v0.7.7...v0.7.8
v0.7.7
Current llcppg is compiled by llgov0.12.0
What's Changed
- ci: limit action concurrecy numbers by @MeteorsLiu in #574
- build(deps): bump github.com/goplus/gogen from 1.19.2 to 1.19.3 by @dependabot[bot] in #575
- build(deps): bump github.com/goplus/gogen from 1.19.3 to 1.19.5 by @dependabot[bot] in #578
- docs: add CLAUDE.md AI assistant guide by @xgopilot[bot] in #577
- ci: remove unnecessary Python setup from macOS CI by @luoliwoshang in #584
- build(deps): bump github.com/goplus/lib from 0.3.0 to 0.3.1 by @xgopilot[bot] in #587
- build(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #591
- demo:update to libxml2v2.15 use by @luoliwoshang in #602
- ci: exclude bot branches from push event triggers by @xgopilot[bot] in #605
- build(deps): bump github.com/goplus/mod from 0.17.1 to 0.18.0 by @dependabot[bot] in #608
- deps: update to llgo v0.12.0 and related dependencies by @xgopilot[bot] in #606
- feat: use prebuilt llgo v0.12.0 and keep LLVM for clang by @xgopilot[bot] in #610
- chore: update llcppg to generate go.mod with goplus/lib v0.3.1 by @xgopilot[bot] in #612
New Contributors
Full Changelog: v0.7.6...v0.7.7
v0.7.6
What's Changed
feat
- feat: support nested enum by @MeteorsLiu in #528
update
- internal/clang:remove wrap by @luoliwoshang in #564
ci
deps
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #543
- build(deps): bump github.com/goplus/gogen from 1.19.0 to 1.19.1 by @dependabot[bot] in #546
- deps:update llgo to e4218f9 by @luoliwoshang in #563
- build(deps): bump github.com/goplus/lib from 0.2.0 to 0.3.0 by @dependabot[bot] in #566
- build(deps): bump github.com/goplus/lib from 0.2.0 to 0.3.0 by @dependabot[bot] in #566
- build(deps): bump github.com/goplus/gogen from 1.19.1 to 1.19.2 by @dependabot[bot] in #567
docs
- docs: standardize C/C++ language names to uppercase in documentation and code comments by @Copilot in #537
- Add comprehensive GitHub Copilot instructions for llcppg development by @Copilot in #533
- docs: replace lowercase "go" and "llgo" with "Go" and "LLGo" in documentation by @Copilot in #539
- Fix JSON field name in README.md: change 'includes' to 'include' by @luoliwoshang in #550
- docs: Fix typos in documentation and code comments by @luoliwoshang in #551
- docs: wrap config file names with backticks in markdown by @luoliwoshang in #545
- Fix punctuation spacing in Go code comments by @luoliwoshang in #554
- Fix punctuation spacing in English documentation by @luoliwoshang in #553
- docs: add nested enum by @MeteorsLiu in #530
- 实现 Issue #568: docs:find typo & fix it by @niupilot[bot] in #570
New Contributors
- @Copilot made their first contribution in #537
- @niupilot[bot] made their first contribution in #570
- @aofei made their first contribution in #573
Full Changelog: v0.7.5...v0.7.6
v0.7.5
What's Changed
parser
- fix(parser): anonymous struct behavior when
isCppis false by @MeteorsLiu in #524 - feat:distinguish forwarddecl & empty decl by @luoliwoshang in #527
change
- chore:move from goplus/lib/c/clang by @luoliwoshang in #529
Full Changelog: v0.7.4...v0.7.5
v0.7.4
What's Changed
- chore(style): refine some error name by @luoliwoshang in #518
- fix(llcppsymg):avoid ignore flag process overload by @luoliwoshang in #523
Full Changelog: v0.7.3...v0.7.4
v0.7.3
What's Changed
doc
- docs(design): add named nested struct handling design by @luoliwoshang in #515
parser
- feat(parser): nested struct/union decl by @luoliwoshang in #516
Full Changelog: v0.7.2...v0.7.3
Nested Struct
Anonymous Nested Struct
Anonymous nested structs/unions are converted to inline Go struct types within the parent struct.
struct outer {
struct {
int x;
int y;
} inner;
};type Outer struct {
Inner struct {
X c.Int
Y c.Int
}
}Named Nested Struct
Named nested structs in C are accessible in the global scope, not just as anonymous nested types. llcppg handles this by creating separate type declarations for both the outer and inner structs.
Reason: In C, named nested structs are declared in the global scope and can be used independently. This means struct inner_struct can be used anywhere in the code, not just within the context of the outer struct.
typedef struct struct2 {
char *b;
struct inner_struct {
long l;
} init;
} struct2;
// This is valid C - inner_struct is in global scope
struct inner_struct inner = {123};Generated Go code:
type InnerStruct struct {
L c.Long
}
type Struct2 struct {
B *c.Char
Init InnerStruct
}This is equivalent to:
struct inner_struct {
long l;
};
struct struct2 {
char *b;
struct inner_struct init;
};v0.7.2
What's Changed
llcppsymg
- fix(llcppsymg): skip generating variadic function as a receiver method by @MeteorsLiu in #513
cl
- cl:avoid c function with valist to method by @luoliwoshang in #512
change
- refactor(pkghfileinfo): replace libclang with clang for pkghfile by @MeteorsLiu in #509
docs
- docs(design):function with va list should not have receiver by @luoliwoshang in #511
To Method
When a C function could be a Go method, llcppg automatically converts the function to a Go method, moving the first parameter to the receiver position, and using recv_ as the receiver name.
Since Go's //go:linkname directive doesn't support methods, llgo uses // llgo:link to mark the connection between methods and C symbols.And generated methods return zero values of their return types as placeholders.
And LLGo should not treat C functions with variable parameters as methods. Variadic functions (those using ... in their parameter list) will be generated as regular Go functions rather than methods, even if they otherwise meet the criteria for method conversion.
Full Changelog: v0.7.1...v0.7.2
v0.7.1
What's Changed
llcppsymg
- feat(llcppsymg): filter static function for AST scanning by @MeteorsLiu in #488
- feat(llcppsymg): support header-only mode by @MeteorsLiu in #492
parser
- internal/parser:parse unexpose type by @luoliwoshang in #506
cl
- refactor(cl):allow empty lib command by @luoliwoshang in #491
docs
- docs: trim whitespace by @MeteorsLiu in #490
- docs(design): add
headerOnlyby @MeteorsLiu in #489 - docs(README): trim whitespace by @MeteorsLiu in #495
- docs(README): add header-only readme by @MeteorsLiu in #496
- docs(design): fix header-only title level by @MeteorsLiu in #500
test
- test(llcppsymg): replace test logics with source func by @MeteorsLiu in #493
Full Changelog: v0.7.0...v0.7.1
Usage
The configuration file supports the following options:
name: The name of the generated packagecflags: Compiler flags for the C/C++ libraryinclude: Header files to include in the binding generationlibs: Library flags for linkingtrimPrefixes: Prefixes to remove from function names & type namescplusplus: Set to true for C++ libraries(not support)deps: Dependencies (other packages & standard libraries)mix: Set to true when package header files are mixed with other header files in the same directory. In this mode, only files explicitly listed inincludeare processed as package files.typeMap: Custom name mapping from C types to Go types.symMap: Custom name mapping from C function names to Go function names.staticLib: Set to true to enable static library symbol reading instead of dynamic library linking. When enabled, llcppg will read symbols from static libraries (.a files) rather than dynamic libraries (.so/.dylib files).headerOnly: Set to true to enable header-only mode. In header-only processing mode, instead of matching library symbols with header declarations, it will generate the symbol table based solely on header files specified in cflags.
v0.7.0
What's Changed
llcppsymg
- llcppsymg:static lib mode by @luoliwoshang in #478
- fix(llcppsymg): clean path for presumed location by @MeteorsLiu in #485
parser
- internal/parser:ast.Object with filepath.Clean by @luoliwoshang in #481
llcppcfg
- feat(llcppcfg): omit optional fields empty by @MeteorsLiu in #465
ci/test
- ci: upgrade llgo by @MeteorsLiu in #466
- ci: upgrade llgo for llgo test ./... by @MeteorsLiu in #471
- ci(llgotest):remove complete comment by @luoliwoshang in #472
- feat: copy demos to tmp dir by @MeteorsLiu in #482
- test(llcppsymg):test fetch symbol with actual symbol file by @luoliwoshang in #476
docs
- docs: add llcppcfg design by @MeteorsLiu in #467
- docs(design):why cross-platform handing by @luoliwoshang in #470
- docs(design):staticLib by @luoliwoshang in #484
- docs(readme):staticLib by @luoliwoshang in #486
changes
- feat(hfile):platform file determine interface by @luoliwoshang in #469
- chore:test case name of llcppsymg by @luoliwoshang in #487
Full Changelog: v0.6.0...v0.6.1
Static Library Support
When staticLib: true is configured in llcppg.cfg, llcppsymg switches to static library mode:
- Dynamic Library Mode (default): Uses nm tool to extract symbols from .so/.dylib files
- Static Library Mode: Uses nm tool to extract symbols from .a files