#config #web #service #remote

archived bin+lib cadre

Cadre is a simple, self-hosted, high-performance remote configuration service

9 releases (4 breaking)

0.5.4 Nov 7, 2022
0.5.3 Aug 9, 2022
0.5.2 Jul 13, 2022
0.4.0 Jun 29, 2022
0.1.0 Jun 28, 2022

#1919 in Web programming

38 downloads per month

MIT license

680 lines

cadre: configure apps


High-performance, minimal remote configuration service that's extremely simple to set up and use.

Configuration is backed by S3, updated from a human-readable web interface and persisted to a file on disk. Multiple environments are supported and accessible from a JSON web API. Plus, cadre is really easy to set up: just run a single binary that contains the entire application, passing in an S3 bucket name.

The web server is written in Rust and can easily support over 80,000 HTTP/2 requests per second running on a consumer MacBook Pro, tested using vegeta. It's also horizontally scalable.

Template Syntax

Template values have keys that are prefixed with the * character. These values are resolved at request-time.

  • aws:<NAME>: A JSON secret stored in AWS Secrets Manager. For performance, secrets are cached by the server for up to a minute.

All resolution of fields within templates is recursive. Additionally, you can optionally specify a default template, which is merged with the selected template whenever a configuration is requested.


Run the cargo install cadre and use the cadre command. We also offer a Docker image at ghcr.io/modal-labs/cadre, which is automatically built from the Dockerfile in this repository on each release.

To perform a new release, check that you have write access to this GitHub repository and the cadre crate on crates.io, then just run a single command: cargo release.


This library is created by the team behind Modal.


~784K SLoC