@@ -105,7 +105,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Or put it into a package (see [c/math](https://github.com/goplus/lib/c/math/math.go)):
|
Or put it into a package (see [c/math](https://github.com/goplus/lib/tree/main/c/math/math.go)):
|
||||||
|
|
||||||
<!-- embedme doc/_readme/llgo_call_cmath/call_cmath.go -->
|
<!-- embedme doc/_readme/llgo_call_cmath/call_cmath.go -->
|
||||||
|
|
||||||
@@ -243,9 +243,9 @@ The currently supported libraries include:
|
|||||||
Here are some examples related to them:
|
Here are some examples related to them:
|
||||||
|
|
||||||
* [llama2-c](_demo/llama2-c): inference Llama 2 (It's the first llgo AI example)
|
* [llama2-c](_demo/llama2-c): inference Llama 2 (It's the first llgo AI example)
|
||||||
* [mkjson](https://github.com/goplus/lib/c/cjson/_demo/mkjson/mkjson.go): create a json object and print it
|
* [mkjson](https://github.com/goplus/lib/tree/main/c/cjson/_demo/mkjson/mkjson.go): create a json object and print it
|
||||||
* [sqlitedemo](https://github.com/goplus/lib/c/sqlite/_demo/sqlitedemo/demo.go): a basic sqlite demo
|
* [sqlitedemo](https://github.com/goplus/lib/tree/main/c/sqlite/_demo/sqlitedemo/demo.go): a basic sqlite demo
|
||||||
* [tetris](https://github.com/goplus/lib/c/raylib/_demo/tetris/tetris.go): a tetris game based on raylib
|
* [tetris](https://github.com/goplus/lib/tree/main/c/raylib/_demo/tetris/tetris.go): a tetris game based on raylib
|
||||||
|
|
||||||
|
|
||||||
## Go syntax support
|
## Go syntax support
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module readme
|
module github.com/goplus/llgo/doc/_readme
|
||||||
|
|
||||||
go 1.24.1
|
go 1.20
|
||||||
|
|
||||||
require github.com/goplus/lib v0.1.0
|
require github.com/goplus/lib v0.1.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd ./doc/_readme/ || exit 1
|
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||||
llgo build -v ./...
|
cd "$DIR" || exit 1
|
||||||
|
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
@@ -11,9 +11,10 @@ PYTHONPATH=""
|
|||||||
PYTHONPATH=$(python -c "import sys; print(':'.join(sys.path))")
|
PYTHONPATH=$(python -c "import sys; print(':'.join(sys.path))")
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
|
|
||||||
for dir in ./*/; do
|
for sub in ./*/; do
|
||||||
if grep -q "func main()" "$dir"/*.go 2>/dev/null; then
|
if grep -q "func main()" "$DIR/$sub"/*.go 2>/dev/null; then
|
||||||
echo "Running examples in $dir"
|
echo "Running examples in $sub"
|
||||||
llgo run "$dir"
|
cd "$DIR/$sub" || exit 1
|
||||||
|
llgo run .
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user