From c589605407ce98e9bfc6b3f322d468a52510b2d8 Mon Sep 17 00:00:00 2001 From: Jannik Beyerstedt Date: Mon, 11 May 2026 22:22:39 +0200 Subject: [PATCH] chore: Add rustfmt config --- Readme.md | 7 ++++++- rustfmt.toml | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 rustfmt.toml diff --git a/Readme.md b/Readme.md index 5a847e7..02d912f 100644 --- a/Readme.md +++ b/Readme.md @@ -7,7 +7,7 @@ Displays different C-ITS receive-only use cases for cheap. ### Toolchain Installation Install the toolchain, targe and tools like this: -``` +```shell rustup toolchain install nightly --component rust-src rustup target add riscv32imac-unknown-none-elf @@ -18,6 +18,11 @@ cargo install espflash --locked (Project was setup using esp-generate with the options `--chip esp32c5 -o esp32c5-wroom-1-psram -o alloc -o log -o unstable-hal -o wifi -o esp-backtrace -o embassy`.) +To use the proper rustfmt features, enable the nightly toolchain: +```shell +rustup component add --toolchain nightly rustfmt +``` + ### Build and Flash Connect your ESP32-C5 and run: diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..4317306 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,6 @@ +unstable_features = true +format_code_in_doc_comments = true + +group_imports = "StdExternalCrate" +imports_granularity = "Module" +imports_layout = "HorizontalVertical"