A refreshingly simple build2 ux.
bux2 is a lightweight wrapper around the build2 build toolchain for C++.
Configuration is done through a single bux2.toml file that maps directly onto build2 files.
bux2 also provides a command line interface to run build2 commands.
For the best experience, bux2.toml and the bux2 CLI are used together, but they don't depend on each other, and you may use a combination of traditional build2 and bux2 tools.
Ensure you have build2 installed on your machine.
Ensure the bdep command is installed and up to date:
bdep --versionInstall bux2 from source with cargo:
cargo install bux2 --lockedInstall prebuilt binary with cargo-binstall:
cargo binstall bux2
Or, download a prebuilt binary from the releases page.
The bux2 cli offers a new subcommand for creating new projects.
bux2 new example-projectThe new project contains a source directory, a build directory, and a bux2.toml file.
Adjust the [profile.debug] and [profile.release] tables to your liking, then run:
bux2 init --profile debug
bux2 init --profile releaseTo initialize the configurations.
Then, build with:
bux2 build --profile debugAdding dependencies is as simple as adding a key to bux2.toml.
Dependencies from the build2 package repository are added like so:
[dependencies]
channels = ["stable"]
fmt = { version = "10.2.1", targets = ["fmt"] }The special channel key controls what cppget repositories to download from.
The potential values are as follows:
| name | url | category |
|---|---|---|
| "stable" | https://pkg.cppget.org/1/stable/ | Stable, maintained, reviewed packages |
| "testing" | https://pkg.cppget.org/1/testing/ | Newer, potentially unreviewed packages |
| "legacy" | https://pkg.cppget.org/1/legacy/ | Old packages, kept for backwards compatibility. |
| "alpha" | https://pkg.cppget.org/1/alpha/ | Newest available packages, very unstable. |
| "beta" | https://pkg.cppget.org/1/beta/ | More refined, polished packages compared to "alpha" |
Dependencies fetched from github or other source repositores are not recomended unless you are sure they provide build2 metadata. cppget packages always do.
If you are sure the repository provides the required metadata, add it like so:
[dependencies]
libawesome = { repo = "https://source/someone/libawesome", version = "1.0.0", targets = ["awesome"] }Libraries you write and have on your machine are imported like so:
[dependencies]
libawesome = { path = "/Users/user/c++/libawesome", version = "1.0.0", targets = ["awesome"] }bux2 is a work-in-progress, and is also limited by build2's progress and documentation. Some planned features:
- Support for
build2native testing viatestscript. - Build-time dependencies. Currently can be specified, but don't work as intended.
- Advanced project templates.
The following features will be implemented as build2 makes them available.
-
compile_commands.jsongeneration. Supposed to be available in the nextbuild2release!
Project status and quality reports, follow these and watch the project grow!
Build and testing:
Packaging and release:
Github relases:
Crate downloads:
Github downloads:
Commits per month:
Contributors: