Development
Toolchain
The workspace pins the Rust toolchain via rust-toolchain.toml (currently
1.97.1). CI runs:
Documentation site
The documentation site is built with Rspress. Install JavaScript dependencies and build it locally with:
For live reload while editing pages, run
npm --prefix docs run docs:start.
CI builds from the docs/ workspace with dead-link and anchor checking enabled.
CLI
--output writes the real YAML with 0600 permissions. --quiet alone prints
an unusable [REDACTED] YAML and is only meant for demos/audits.
From the source tree, prefix any command with cargo run -p cumments --, e.g.
cargo run -p cumments -- backfill.
Building the Docker image from main
The repository's misc/docker/Dockerfile builds from the local checkout:
For a self-contained Dockerfile that clones the upstream main branch (useful
for testing before a release), keep these points in mind:
-
A
git cloneinside aRUNstep is cached by Docker by the command string: later builds reuse the first cloned snapshot. Bust the cache withdocker compose build --no-cacheor a build arg whose value changes every build (e.g.--build-arg CACHEBUST=$(date +%s)). -
--mount=type=cache,target=/app/targetkeeps the cargotarget/directory in a cache mount. Cache-mount content is not part of the image, so copy the built binary out of the cache within the sameRUN:
Testing locally without a homeserver
Set mode = "logging" in the config (see docs/configuration.md). The API and
the submission queue run, but nothing is written to Matrix and comments are not
projected back.