Skip to content

Cargo features

The umbrella crate is published as rust-tool-base and imported as rtb. The bare rtb name is taken on crates.io by an unrelated tool, so downstream tools rename the dependency:

[dependencies]
rtb = { package = "rust-tool-base", version = "0.9.0" }

Each feature pulls in one standalone module crate and re-exports it under a short path.

The feature table

Feature Default Pulls in Re-exported as
cli on rtb-cli 0.9.0 rtb::cli
update on rtb-update 0.9.0 rtb::update
docs on rtb-docs 0.9.0 rtb::docs
mcp on rtb-mcp 0.9.0 rtb::mcp
credentials on rtb-credentials 0.6.0 rtb::credentials
tui on rtb-tui 0.6.1 rtb::tui
chat off rtb-chat 0.7.0, and rtb-docs's own ai feature rtb::chat
telemetry off rtb-telemetry 0.7.0 rtb::telemetry
forge off rtb-forge 0.7.0 rtb::forge
credentials-linux-persistent off credentials plus rtb-credentials/linux-persistent
full off cli, update, docs, mcp, chat, credentials, tui, telemetry, forge

The default set is cli, update, docs, mcp, credentials, tui. Note that full is not every feature — it deliberately excludes credentials-linux-persistent, because that one needs system libraries.

What is always compiled in

Four crates are unconditional dependencies with no feature gate, so their re-exports exist in every build:

Crate Re-exported as
rtb-app 0.9.0 rtb::core
rtb-assets 0.6.0 rtb::assets
rtb-config 0.6.0 rtb::config
rtb-error 0.6.0 rtb::error

rtb::prelude glob-imports rtb::core::prelude::* plus Error and Result from rtb::error.

Two features were renamed before 1.0

At the Wave-4 extraction the AI and VCS crates were renamed, and the umbrella features followed:

Was Now Re-export was Re-export now
ai chat rtb::ai rtb::chat
vcs forge rtb::vcs rtb::forge

rtb-docs kept its internal feature named ai, which is why the umbrella's chat feature enables rtb-docs?/ai rather than rtb-docs?/chat.

credentials-linux-persistent needs system packages

The default Linux keychain backend does not survive a reboot. The persistent one talks to the freedesktop Secret Service and needs libdbus-1-dev and pkg-config on the build host, which is why it is off by default — it keeps cargo build hermetic on a bare Linux image.

This is also the split behind the justfile's two tiers: just check, just test and just lint run the default feature set and work anywhere, while check-full, test-full, lint-full and ci-full add --all-features and require those packages.

A feature is only half the switch

Compiling a module in does not put its commands on the CLI. The runtime Features set the tool builds decides that separately, per invocation — see built-in commands. rtb itself compiles rtb-chat in and enables the Ai runtime feature explicitly, because Ai is not in the framework's default-on runtime set.

Minimum supported Rust

rust-version = "1.82", edition 2021, set once in [workspace.package] and inherited by every crate in the workspace.