The repository contains implementations of Maelstrom challenges in various programming languages (currently Rust and C++), using Bazel as the build system. It serves as my playground for experimenting with different build systems such as Cargo, CMake, Bazel, and potentially others in the future.
You may find these related articles insightful:
- Returning to Rust: A Journey Through Tooling and Performance
- Bazel and Rust: A Perfect Match for Scalable Development
- Managing Multi-Language Projects with Bazel
- How to Compile C++ in 2025: Bazel or CMake?
Since the repository is Bazel-based, you can follow the typical Bazel workflow:
bazel build //...
bazel test //...To generate a compile_commands.json file for better editor support, use:
bazel run @hedron_compile_commands//:refresh_allIf you'd like to run the Rust-specific part of the codebase using Cargo, follow these steps:
- Build the project: Run the
cargo buildcommand to compile the binaries. - Run tests: Execute
cargo testafter the build is complete.
While the preferred approach is to use the cargo test command directly, certain dependencies or configurations might require a prior build step. See comments in echo/Cargo.toml and Cargo.toml for additional details.
cargo build
cargo test