Skip to content

Reference

Every public item in rtb-app and rtb-test-support, with its default and what happens when it is set wrong. For prose about why the crate is shaped this way, see Explanation.

Which page covers which module

Module Page Principal items
rtb_app::app App App
rtb_app::metadata Tool metadata ToolMetadata, ReleaseSource, HelpChannel, UpdatePolicy
rtb_app::features Features Feature, Features, FeaturesBuilder
rtb_app::command Commands Command, CommandSpec, BUILTIN_COMMANDS, PreRunHook, BUILTIN_PRERUN_HOOKS
rtb_app::version Version information VersionInfo, version_info!
rtb_app::typed_config Typed configuration ErasedConfig, erase, TypedConfigOps
rtb_app::credentials Credentials CredentialProvider, NoCredentials, list_or_empty
rtb_app::regex_util Bounded regex compilation compile_bounded, RegexCompileError, the three limit constants
rtb_test_support Test support TestAppBuilder, TestWitness

What the prelude brings in

rtb_app::prelude is a glob-importable set of the types most wiring code needs. A use rtb_app::prelude::*; imports exactly these and nothing else:

Item From
App rtb_app::app
Command, CommandSpec, BUILTIN_COMMANDS rtb_app::command
Feature, Features rtb_app::features
HelpChannel, ReleaseSource, ToolMetadata, UpdatePolicy rtb_app::metadata
compile_bounded rtb_app::regex_util
VersionInfo, version_info! rtb_app::version
CredentialProvider, NoCredentials rtb_app::credentials
CredentialBearing, CredentialRef re-exported from rtb-credentials

Note what is not in it: FeaturesBuilder, ErasedConfig, TypedConfigOps, erase, RegexCompileError, PreRunHook and BUILTIN_PRERUN_HOOKS all need an explicit path.

Cargo features

rtb-app and rtb-test-support declare no Cargo features at all. Nothing about this crate is conditionally compiled, so there is no feature flag to turn on and no default-features = false to worry about.

This is a common point of confusion because the crate also has a type called Feature. That one is a runtime switch controlling which built-in commands a given invocation exposes — see Features. Cargo features on the rtb umbrella crate decide what is compiled; rtb_app::Feature decides what is visible. They are unrelated mechanisms with an unfortunate shared word.

Crate-level guarantees

Guarantee Where it comes from
No unsafe code #![forbid(unsafe_code)] at the top of both lib.rs files
Minimum Rust version 1.82 rust-version in the workspace manifest
Rust edition 2021 edition in the workspace manifest
Licence MIT license in the workspace manifest
Both crates always share a version one version key in [workspace.package]; release-plz cuts them together
No dependency back on the framework deny.toml bans rust-tool-base and rtb-cli-bin outright
No openssl-sys or native-tls in the graph deny.toml bans both
anyhow only via cucumber in dev builds deny.toml allows it only through that wrapper

Direct dependencies of rtb-app

Anything here is in your dependency graph if you depend on rtb-app.

rtb-error, rtb-config, rtb-assets, rtb-credentials, tokio-util (with the rt feature), async-trait, serde, serde_json, schemars, semver, bon, linkme, miette (with fancy), regex, thiserror.

rtb-test-support depends on rtb-app, rtb-config, rtb-assets, semver, serde and schemars.