#settings #embedded #no-std #configuration #mqtt

macro no-std derive_miniconf

Derive utilities for Miniconf run-time settings configuration

3 unstable releases

0.3.0 Dec 13, 2021
0.1.1 Oct 28, 2021
0.1.0 Aug 11, 2021

#55 in Configuration

Download history 63/week @ 2021-09-28 41/week @ 2021-10-05 5/week @ 2021-10-12 2/week @ 2021-10-19 57/week @ 2021-10-26 145/week @ 2021-11-02 201/week @ 2021-11-09 46/week @ 2021-11-16 65/week @ 2021-11-23 62/week @ 2021-11-30 85/week @ 2021-12-07 226/week @ 2021-12-14 46/week @ 2021-12-21 121/week @ 2021-12-28 147/week @ 2022-01-04 87/week @ 2022-01-11

428 downloads per month
Used in 2 crates (via miniconf)

MIT license

259 lines


QUARTIQ Matrix Chat Continuous Integration

MiniConf is a no_std minimal run-time settings configuration tool designed to be run on top of any communication means. It was originally designed to work with MQTT clients and provides a default implementation using minimq as the MQTT client.


Miniconf provides an easy-to-work-with API for quickly adding runtime-configured settings to any embedded project. This allows any internet-connected device to quickly bring up configuration interfaces with minimal implementation in the end-user application.

MiniConf provides a Miniconf derive macro for creating a settings structure, e.g.:

use miniconf::Miniconf;

struct NestedSettings {
    inner: f32,

struct MySettings {
    initial_value: u32,
    internal: NestedSettings,

Settings Paths

A setting value must be configured via a specific path. Paths take the form of variable names separated by slashes - this design follows typical MQTT topic design semantics. For example, with the following Settings structure:

struct Data {
    inner: f32,

struct Settings {
    initial_value: u32,
    internal: Data,

We can access Data::inner with the path internal/inner.

Settings may only be updated at the terminal node. That is, you cannot configure <device-id>/settings/internal directly. If this is desired, instead derive MiniconfAtomic on the struct Data definition. In this way, all members of struct Data must be updated simultaneously.

Settings Values

MiniConf relies on using serde for defining a de/serialization method for settings. Currently, MiniConf only supports serde-json de/serialization formats, although more formats may be supported in the future.


~17K SLoC