Contributions are very welcome. Thank you for taking the time to contribute to Cubic!
There are many ways to contribute, no matter your background:
- Report bugs — open an issue on GitHub if something does not work as expected.
- Request features — open an issue on GitHub to suggest improvements.
- Improve documentation — fix typos, clarify explanations, or add missing guides in the
docs/directory. - Submit code changes — open a pull request with your fix or feature.
- Join the discussion — share feedback and ideas on existing issues and pull requests.
Before building Cubic, ensure you have the necessary tools installed:
- Git
- GCC
- Rustup
For Debian, Ubuntu, and derivatives:
sudo apt update && sudo apt install -y git gcc rustupFor Fedora and derivatives:
sudo dnf install -y git gcc rustup && sudo rustup-init -yFor OpenSUSE and derivatives:
sudo zypper install -y git gcc rustupThen clone the repository:
git clone https://github.com/cubic-vm/cubic.git
cd cubic/
rustup toolchain install stableDebug build (fast compile, no optimisations):
cargo buildRelease build (optimised, matches the distributed binary):
cargo build --locked --releaseThe release binary is written to target/release/cubic.
Note:
--lockedensures the build uses the exact dependency versions intended by the developers.
cargo run -- [COMMAND] [OPTIONS]For example:
cargo run -- images
cargo run -- --helpTo actually run virtual machines, Cubic requires QEMU to be installed on the host:
qemu-system-x86_64qemu-system-aarch64qemu-img
cargo testTo run a single test by name:
cargo test <test_name>The documentation is built with Sphinx.
The source files live in the docs/ directory and are written in
reStructuredText.
First, generate the CLI reference pages from the binary's help output:
./scripts/generate-docs.sh devThen build the HTML site:
sphinx-build docs target/docThe output is written to target/doc/.
cargo fmtTo only check without modifying files:
cargo fmt --checkcargo clippy -- -D warningsTo automatically apply safe fixes:
cargo clippy --fix --allow-dirtycargo auditHigh quality pull requests are easier to review and thus take less of your and our time.
General guideline:
- Each pull request must have exactly one intent (fix a bug, update doc, etc.).
- Each pull request should have one Git commit (not mandatory, but recommended).
- Each Git commit must have a descriptive message that explains the changes.
- Each Git commit must have a sign-off (
git commit --signoff), which indicates that you agree with the Developer Certificate of Origin. - Each Git commit message must start with either:
feat: ...for featuresfix: ...for bug and security fixesperf: ...for performance improvementsrefactor: ...for code refactoringsstyle: ...for formatting or whitespace changes with no logic changedocs: ...for documentation changestest: ...for adding or correcting testsbuild: ...for build system or dependency changesci: ...for CI/CD pipeline changeschore: ...for changes not related to source coderevert: ...for reverting a previous commit
Before opening a pull request, please verify that your changes pass all checks:
cargo fmt --check && cargo clippy -- -D warnings && cargo test && cargo auditCubic is dual-licensed under the MIT and Apache 2.0 licenses. By submitting a pull request, you agree that your contribution is licensed under these licenses.