https://github.com/popovicu/glua-kit-example
Example repo for declaring a remote Bazel dependency on glua-kit
https://github.com/popovicu/glua-kit-example
bazel go lua
Last synced: 9 months ago
JSON representation
Example repo for declaring a remote Bazel dependency on glua-kit
- Host: GitHub
- URL: https://github.com/popovicu/glua-kit-example
- Owner: popovicu
- Created: 2025-07-20T19:07:52.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-07-20T19:26:30.000Z (9 months ago)
- Last Synced: 2025-07-20T21:13:50.309Z (9 months ago)
- Topics: bazel, go, lua
- Language: Starlark
- Homepage: https://popovicu.com/glua-kit/
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# glua-kit-example
This repository contains a few examples of how to concisely place a remote dependency on `glua-kit` in your Bazel project. Some example Bazel targets are below.
At the heart of this example is the `MODULE.bazel` file which trivially adds `glua_kit` Bazel repo to the project.
## Standalone bytecode compilation
This uses a `glua-kit` Bazel rule to build a single Lua file into Lua bytecode. Run the following:
```
bazel build //lua:test.luac
```
You can verify the file:
```
file bazel-bin/lua/test.luac
bazel-bin/lua/test.luac: Lua bytecode, version 5.4
```
## Using in a Go application
```
bazel run //go:demo
```
or if you're having linker issues:
```
bazel run --linkopt=-fuse-ld=gold //go:demo
```
The Go binary simply declares an external dependency on the `glua-kit` Go Lua VM library:
```
deps = [
"@glua_kit//go/vm",
],
```