Brutus is a terminal multiplexer.
Brutus uses the Bazel build system.
bazel build //src:brutus
Will produce a binary at bazel-bin/src/brutus
.
If you have a system installation of Cap'n Proto, you can tell bazel to use it by adding the flag --//:use-system-capnp=true
. Otherwise, the Cap'n Proto compiler will be built from source (this can take some time).
Getting language servers to work well with Bazel and generated code requires some setup.
-
Make sure you're using rust-analyzer for rust and gopls for go.
-
Run
gen-project-for-rust-analyzer
to generate arust-project.json
in the repository root.bazel run //:gen-project-for-rust-analyzer
This file supplies Bazel build information to rust-analyzer and will be automatically discovered. Documentation can be found here.
-
Apply the following language server configurations as appropriate for your editor. The scripts used in these configurations assume you have the
capnp
binary on your$PATH
."rust-analyzer.check.overrideCommand": ["scripts/rustanalyzer-bazel-bridge.sh"],
"gopls.env": { "GOPACKAGESDRIVER": "<ABSOLUTE PATH TO REPOSITORY>/scripts/gopls-bazel-bridge.sh", }
- VS Code is already configured via
.vscode/settings.json
. - Neovim is already configured via
.nvim.lua
. This requiresvim.opt.exrc = true
in your global Neovim configuration. - Zed is already configured via
.zed/settings.json
.
- VS Code is already configured via
Update Bazel dependencies from src/server/Cargo.toml
:
CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
Update Bazel dependencies from src/client/go.mod
:
gazelle update-repos -from_file=src/client/go.mod