Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
go-version: '1.24'

- name: Install dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi libuv
brew link --force libffi
brew install llvm@${{matrix.llvm}} lld bdw-gc openssl libffi libuv pkg-config
brew link --overwrite lld libffi
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH

# llcppg dependencies
Expand All @@ -50,10 +50,10 @@ jobs:
- name: Install LLGO
run: |
git clone --branch v0.10.0 https://github.com/goplus/llgo.git
cd llgo
bash ./install.sh
echo $PWD
cd llgo/compiler
go install -v ./cmd/...
export LLGO_ROOT=$GITHUB_WORKSPACE/llgo
export LLGO_ROOT=$PWD
echo "LLGO_ROOT=$LLGO_ROOT" >> $GITHUB_ENV

- name: Build
Expand All @@ -62,11 +62,17 @@ jobs:
- name: Set up Go for testing
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.24'

- name: Install llcppg modules
run: |
echo "Using LLGO_ROOT: $LLGO_ROOT"
echo $PWD
cd $PWD
go get github.com/goplus/lib/c
go get github.com/goplus/llpkg/cjson
go get github.com/goplus/llcppg/_xtool/llcppsymg/config
go mod tidy -e
bash ./install.sh

- name: Test llcppsymg & llcppsigfetch
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ package main

import (
"github.com/author/cjson"
"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down Expand Up @@ -328,9 +328,9 @@ When a header file in the current project references types from third-party pack
In llcppg, there is a consistent pattern for naming aliases related to the standard library. Any alias that starts with `c/` corresponds to a remote repository in the github.com/goplus/llgo.

For example:
* The alias `c` → `github.com/goplus/llgo/c`
* The alias `c/os` → `github.com/goplus/llgo/c/os`
* The alias `c/time` → `github.com/goplus/llgo/c/time`
* The alias `c` → `github.com/goplus/lib/c`
* The alias `c/os` → `github.com/goplus/lib/c/os`
* The alias `c/time` → `github.com/goplus/lib/c/time`

> Note: Standard library type conversion in llgo is not comprehensive. For standard library types that cannot be found in llgo, you will need to supplement these types in the corresponding package at https://github.com/goplus/llgo.

Expand Down Expand Up @@ -367,7 +367,7 @@ You can see this in the generated code, where libxslt correctly references libxm
package libxslt

import (
"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
"github.com/goplus/llpkg/libxml2"
"unsafe"
)
Expand Down
17 changes: 0 additions & 17 deletions _demo/cjsondemo/demo.go

This file was deleted.

8 changes: 0 additions & 8 deletions _demo/cjsondemo/go.mod

This file was deleted.

8 changes: 0 additions & 8 deletions _demo/cjsondemo/go.sum

This file was deleted.

2 changes: 1 addition & 1 deletion _llcppgtest/cjson/demo/hello/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"cjson"
"unsafe"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/cjson/demo/readobj/readobj.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"cjson"
"fmt"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/gettext/demo/trans/trans.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"gettext"
"unsafe"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func handle(severity c.Int, message gettext.MessageT, filename *int8, lineno c.Ulong, column c.Ulong, multiline_p c.Int, message_text *int8) {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/gmp/demo/isPrime/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
. "gmp"
"strconv"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

var primes = []int{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997}
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/gpgerror/demo/keyerror/keyerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"gpgerror"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

var SOURCEMASK = gpgerror.SOURCEDIM - 1
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/isl/demo/intersect/intersect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"isl"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/libxml2/demo/parsexml/parsexml.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"libxml2"
"unsafe"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/libxslt/demo/withdeplibxml/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"libxslt"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
"github.com/goplus/llpkg/libxml2"
)

Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/lua/demo/hello/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"lua"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/lua/demo/loadcall/loadcall.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"lua"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/lua/demo/metatable/metatable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"lua"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func toString(L *lua.State) c.Int {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/raylib/demo/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"raylib"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions _llcppgtest/sqlite/demo/hello/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"sqlite"

"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/os"
"github.com/goplus/lib/c"
"github.com/goplus/lib/c/os"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/z3/demo/demo/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"z3"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/zlib/demo/efficiency/efficiency.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"unsafe"
"zlib"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _llcppgtest/zlib/demo/normal/normal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"unsafe"
"zlib"

"github.com/goplus/llgo/c"
"github.com/goplus/lib/c"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _xtool/llcppsigfetch/llcppsigfetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"strings"
"unsafe"

"github.com/goplus/lib/c"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/dbg"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/parse"
"github.com/goplus/llcppg/_xtool/llcppsymg/args"
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llcppg/_xtool/llcppsymg/config"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llgo/c"
"github.com/goplus/llpkg/cjson"
)

Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsigfetch/parse/cvt.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"strings"
"unsafe"

"github.com/goplus/lib/c"
"github.com/goplus/lib/c/clang"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/dbg"
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llcppg/_xtool/llcppsymg/config"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llcppg/token"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
"github.com/goplus/llpkg/cjson"
)

Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsigfetch/parse/cvt_test/cvt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"sort"
"unsafe"

"github.com/goplus/lib/c"
"github.com/goplus/lib/c/clang"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/parse"
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
"github.com/goplus/llpkg/cjson"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"strings"

"github.com/goplus/lib/c"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/parse"
test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llgo/c"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsigfetch/parse/cvt_test/type_test/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"os"
"unsafe"

"github.com/goplus/lib/c"
"github.com/goplus/lib/c/clang"
"github.com/goplus/llcppg/_xtool/llcppsigfetch/parse"
test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
"github.com/goplus/llpkg/cjson"
)

Expand Down
2 changes: 1 addition & 1 deletion _xtool/llcppsigfetch/parse/dump.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package parse

import (
"github.com/goplus/lib/c"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llgo/c"
"github.com/goplus/llpkg/cjson"
)

Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsymg/_cmptest/clangutils_test/clangutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path"
"path/filepath"

"github.com/goplus/lib/c"
"github.com/goplus/lib/c/clang"
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsymg/clangutils/clangutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"strings"
"unsafe"

"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
"github.com/goplus/lib/c"

Check failure on line 11 in _xtool/llcppsymg/clangutils/clangutils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/lib/c (invalid package name: "")

Check failure on line 11 in _xtool/llcppsymg/clangutils/clangutils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/lib/c (invalid package name: "")
"github.com/goplus/lib/c/clang"

Check failure on line 12 in _xtool/llcppsymg/clangutils/clangutils.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")

Check failure on line 12 in _xtool/llcppsymg/clangutils/clangutils.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")
)

type Config struct {
Expand Down
4 changes: 2 additions & 2 deletions _xtool/llcppsymg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"strings"
"unsafe"

"github.com/goplus/lib/c"

Check failure on line 10 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/lib/c (invalid package name: "")

Check failure on line 10 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

no required module provides package github.com/goplus/lib/c; to add it:

Check failure on line 10 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/lib/c (invalid package name: "")

Check failure on line 10 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

no required module provides package github.com/goplus/lib/c; to add it:
"github.com/goplus/lib/c/clang"

Check failure on line 11 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")

Check failure on line 11 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

no required module provides package github.com/goplus/lib/c/clang; to add it:

Check failure on line 11 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")

Check failure on line 11 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

no required module provides package github.com/goplus/lib/c/clang; to add it:
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llcppg/llcppg"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/clang"
"github.com/goplus/llpkg/cjson"

Check failure on line 14 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/llpkg/cjson (invalid package name: "")

Check failure on line 14 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

no required module provides package github.com/goplus/llpkg/cjson; to add it:

Check failure on line 14 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/llpkg/cjson (invalid package name: "")

Check failure on line 14 in _xtool/llcppsymg/config/config.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

no required module provides package github.com/goplus/llpkg/cjson; to add it:
)

type Conf struct {
Expand Down
2 changes: 1 addition & 1 deletion _xtool/llcppsymg/parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"strconv"
"strings"

"github.com/goplus/lib/c/clang"

Check failure on line 10 in _xtool/llcppsymg/parse/parse.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-24.04, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")

Check failure on line 10 in _xtool/llcppsymg/parse/parse.go

View workflow job for this annotation

GitHub Actions / test (macos-latest, 18)

could not import github.com/goplus/lib/c/clang (invalid package name: "")
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
"github.com/goplus/llcppg/_xtool/llcppsymg/dbg"
"github.com/goplus/llcppg/_xtool/llcppsymg/names"
"github.com/goplus/llgo/c/clang"
)

type SymbolInfo struct {
Expand Down
Loading
Loading