| crates | ||
| tools | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
bygge-zig
Bygge compiled your project without Cargo.
bygge-zig does it with Zig.
Why?
Learn a bit more about Zig, learn a bit more about the Zig build system and get a deeper understanding of what cargo does to build a full Rust project.
What it does
zig build builds a Rust project, as defined by the Cargo.toml around.
It works for the example project in this repository.
It also works on a checkout of the Glean SDK.
It works on macOS and Linux, for all I know.
What it doesn't
<Ctrl-C Ctrl-v>
This is not and never will be an alternative to Cargo.
Cargo is a full-fledged build system, aware of different build targets, allowing to enable features per dependency, easily cross-compile to different targets and run the built programs as well as tests and generate documentation.
zig build ... builds.
Features
- Builds the example project and the Glean SDK
- Builds cargo dependencies as listed in a project's Cargo.toml
- Runs on (at least) macOS and Linux
- Supports
build.rsfiles - Supports proc-macros
- Non-Rust libraries should work (if they are built in
build.rs)
Requirements
Use bygge-zig
Copy build.zig, tools/* to your project.
zig build
License
bygge is distributed under the terms of the MIT license.
See LICENSE for details.