Skip to content

Releases: goplus/llcppg

v0.8.0

14 Feb 16:23
a32d1c4

Choose a tag to compare

🚀 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 llcppg as 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

Requirements

  • This version depends on recent LLGo capabilities.
  • Please use an LLGo build from the main branch.

Full Changelog: v0.7.8...v0.8.0

v0.7.8

13 Feb 06:30
beba8c5

Choose a tag to compare

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        *JSON

cl

  • 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

  • docs: use The XGo Authors (xgo.dev) as new copyright info by @xgopilot[bot] in #628

test

  • fix(gettext): remove textstyle/stdbool.h from include list by @xgopilot[bot] in #648

Full Changelog: v0.7.7...v0.7.8

v0.7.7

30 Dec 11:08
963086b

Choose a tag to compare

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

24 Sep 06:00
d3be085

Choose a tag to compare

What's Changed

feat

update

ci

  • chore(ci): migrate from macos-13 to macos-15-intel runner by @aofei in #573

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

06 Aug 09:44
30c4497

Choose a tag to compare

What's Changed

parser

change

Full Changelog: v0.7.4...v0.7.5

v0.7.4

04 Aug 05:07
dbf96dc

Choose a tag to compare

What's Changed

Full Changelog: v0.7.3...v0.7.4

v0.7.3

19 Jul 11:18
3f82aa9

Choose a tag to compare

What's Changed

doc

parser

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

15 Jul 11:27
4075f70

Choose a tag to compare

What's Changed

llcppsymg

  • fix(llcppsymg): skip generating variadic function as a receiver method by @MeteorsLiu in #513

cl

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

10 Jul 10:32
fd56e4b

Choose a tag to compare

What's Changed

llcppsymg

parser

cl

docs

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 package
  • cflags: Compiler flags for the C/C++ library
  • include: Header files to include in the binding generation
  • libs: Library flags for linking
  • trimPrefixes: Prefixes to remove from function names & type names
  • cplusplus: 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 in include are 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

01 Jul 02:56
0e3333d

Choose a tag to compare

What's Changed

llcppsymg

parser

llcppcfg

ci/test

docs

changes

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