Skip to content

kaden126/bux2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bux2

A refreshingly simple build2 ux.

Overview

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.

Installation

Ensure you have build2 installed on your machine. Ensure the bdep command is installed and up to date:

bdep --version

Install bux2 from source with cargo:

cargo install bux2 --locked

Install prebuilt binary with cargo-binstall:

cargo binstall bux2

Or, download a prebuilt binary from the releases page.

Example

The bux2 cli offers a new subcommand for creating new projects.

bux2 new example-project

The 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 release

To initialize the configurations.

Then, build with:

bux2 build --profile debug

Dependencies

Adding dependencies is as simple as adding a key to bux2.toml.

cppget.org (remote) dependencies

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"

Version control (github) dependencies

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"] }

Local dependencies (on your machine)

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"] }

Roadmap

bux2 is a work-in-progress, and is also limited by build2's progress and documentation. Some planned features:

  • Support for build2 native testing via testscript.
  • 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.json generation. Supposed to be available in the next build2 release!

Status

Project status and quality reports, follow these and watch the project grow!

CI/CD

Build and testing:

GitHub Actions Workflow Status

Packaging and release:

GitHub Actions Workflow Status

Versioning

crates.io:

Crates.io Version

Github relases:

GitHub Release

Downloads

Crate downloads:

Crates.io Total Downloads

Github downloads:

GitHub Downloads (all assets, all releases)

Activity

Commits per month:

GitHub commit activity

Contributors:

GitHub contributors

About

A refreshingly simple [b]uild2 [ux]

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors