Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanxi/zig-build-lua
使用zig编译lua,可交叉编译。
https://github.com/hanxi/zig-build-lua
Last synced: 6 days ago
JSON representation
使用zig编译lua,可交叉编译。
- Host: GitHub
- URL: https://github.com/hanxi/zig-build-lua
- Owner: hanxi
- License: mit
- Created: 2024-01-07T05:25:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T07:00:10.000Z (3 months ago)
- Last Synced: 2024-08-18T11:05:12.540Z (3 months ago)
- Language: Zig
- Size: 4.88 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# use zig to compile lua
Easily cross-compile lua executable files for different platforms, without the need for mingw, gcc and other tools.
## Compile
```bash
zig build
```This whill cross-compile all support platform. Output files are in the zig-out directory.
```
[4.0K] zig-out/
├── [4.0K] aarch64-linux
│ └── [3.0M] lua
├── [4.0K] aarch64-macos
│ └── [418K] lua
├── [4.0K] x86_64-linux-gnu
│ └── [1.8M] lua
├── [4.0K] x86_64-linux-musl
│ └── [2.3M] lua
└── [4.0K] x86_64-windows
├── [572K] lua.exe
└── [1.6M] lua.pdb
```## References
- [zig](https://ziglang.org/)
- [lua](https://www.lua.org/)# 使用 zig 编译 lua
方面跨平台交叉编译出 lua 可执行文件,无需 mingw,gcc 等工具。
## 编译
```bash
zig build
```交叉编译,可以一次性编译出所有平台的 Lua 可执行文件。输出文件在 zig-out 目录。
```
[4.0K] zig-out/
├── [4.0K] aarch64-linux
│ └── [3.0M] lua
├── [4.0K] aarch64-macos
│ └── [418K] lua
├── [4.0K] x86_64-linux-gnu
│ └── [1.8M] lua
├── [4.0K] x86_64-linux-musl
│ └── [2.3M] lua
└── [4.0K] x86_64-windows
├── [572K] lua.exe
└── [1.6M] lua.pdb
```## 参考
- [zig](https://ziglang.org/)
- [lua](https://www.lua.org/)