Contributing
Bifröst is dual-licensed under MIT or Apache-2.0. Issues and pull requests go to samishal1998/bifrost.
You need Rust 1.89 or newer (edition 2024).
cargo build --workspaceThe binaries are bifrostd (crate bifrost-daemon), bifrost (bifrost-cli) and bifrost-tui. The
architecture page lists what each crate holds. The internal
engineering guides (architecture, design decisions, one guide per crate) are in
docs/dev-guides on GitHub.
The gate
Section titled “The gate”scripts/check.shIt runs cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and
cargo test --workspace. Every change should pass it.
To check the macOS code from Linux:
rustup target add aarch64-apple-darwincargo check --target aarch64-apple-darwin -p bifrost-core -p bifrost-config -p bifrost-mount -p bifrost-client -p bifrost-cli -p bifrost-tuicargo clippy --target aarch64-apple-darwin -p bifrost-core -p bifrost-config -p bifrost-mount -p bifrost-client -p bifrost-cli -p bifrost-tui -- -D warningsbifrostd and the discovery crate need an Apple toolchain for that target.
End-to-end tests
Section titled “End-to-end tests”tests/e2e/run.sh m1 # milestone 1: p04 p05 p06 psec p13atests/e2e/run.sh all # + p07 p08 p09 p10 p12 p13tests/e2e/run.sh p08_dns p10_http p13_hardening # only these phases, in this order- Needs docker (a throwaway OpenSSH container on
127.0.0.1:2222, CoreDNS on127.0.0.1:5353), jq, curl, pgrep, sshfs, rclone, fusermount3, ssh-keygen and ssh-keyscan, plus python3 and dig forall. - Isolated: everything runs in a
mktemp -dscratch directory with its own keys,known_hosts, socket, state and mount root. Your~/.sshand~/machinesare never touched. - Unset
TMPDIR: the socket path must fit in 103 bytes. - One run at a time, host-wide. A second run exits 2 with “another e2e run is active”. Wait and retry; don’t delete the lock.
- Scratch directories are kept, one per run, never deleted automatically, because that could recurse into a mount that failed to detach. Remove them yourself once nothing is mounted there.
- Phase files (
tests/e2e/pNN_*.sh) definecheck_<p>, and optionallysetup_<p>andconfig_<p>(a TOML fragment).run.shlists them explicitly. - Real mount tests in the mount crate run against the same container:
cargo test -p bifrost-mount -- --ignored(the harness exportsBIFROST_E2E_SSH).
Releasing
Section titled “Releasing”Releases are built by GitHub Actions when a v* tag is pushed.
-
Set the new version in the workspace
Cargo.toml, runcargo buildsoCargo.lockfollows, and commit. -
Tag the commit and push the tag:
Terminal window git tag v0.2.0git push origin v0.2.0 -
The release workflow builds
x86_64-unknown-linux-musl,aarch64-unknown-linux-musl,x86_64-apple-darwinandaarch64-apple-darwin, packs each asbifrost-<target>.tar.gz, writesSHA256SUMS, and publishes a GitHub release with generated notes.
Asset names carry no version, so https://github.com/samishal1998/bifrost/releases/latest/download/<asset>
always points at the newest release, and the install script uses exactly that. To test
the build without publishing, run the release workflow by hand with dry_run checked: it uploads the tarballs as
workflow artifacts only.
These docs
Section titled “These docs”The site lives in site/: Astro Starlight, deployed to GitHub Pages by the
pages workflow on every push to main that touches it.
cd sitenpm cinpm run dev # http://localhost:4321/bifrost/npm run build # static site in site/distThe pages workflow copies the repository’s install.sh into the site root, so the one-liner URL always serves
the script from main. Brand assets come from brand/; the copies used by the site are in site/src/assets.

