feat: add toml and markdown formatters
This commit is contained in:
@@ -2,13 +2,14 @@
|
|||||||
runner = "espflash flash --monitor --chip esp32c6 --log-format defmt"
|
runner = "espflash flash --monitor --chip esp32c6 --log-format defmt"
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
DEFMT_LOG="info"
|
DEFMT_LOG = "info"
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
rustflags = [
|
rustflags = [
|
||||||
# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
|
# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
|
||||||
# NOTE: May negatively impact performance of produced code
|
# NOTE: May negatively impact performance of produced code
|
||||||
"-C", "force-frame-pointers",
|
"-C",
|
||||||
|
"force-frame-pointers",
|
||||||
]
|
]
|
||||||
|
|
||||||
target = "riscv32imac-unknown-none-elf"
|
target = "riscv32imac-unknown-none-elf"
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[global]
|
||||||
|
disable = [
|
||||||
|
# line length limits
|
||||||
|
"MD013",
|
||||||
|
]
|
||||||
|
|
||||||
|
[MD057]
|
||||||
|
absolute-links = "relative_to_roots"
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
name = "rust-esp32-c6"
|
name = "rust-esp32-c6"
|
||||||
rust-version = "1.88"
|
rust-version = "1.88"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rust-esp32-c6"
|
name = "rust-esp32-c6"
|
||||||
@@ -18,7 +18,7 @@ esp-rtos = { version = "0.3.0", features = [
|
|||||||
"esp32c6",
|
"esp32c6",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
defmt = "1.0.1"
|
defmt = "1.0.1"
|
||||||
esp-bootloader-esp-idf = { version = "0.5.0", features = ["defmt", "esp32c6"] }
|
esp-bootloader-esp-idf = { version = "0.5.0", features = ["defmt", "esp32c6"] }
|
||||||
|
|
||||||
embassy-executor = { version = "0.10.0", features = ["defmt"] }
|
embassy-executor = { version = "0.10.0", features = ["defmt"] }
|
||||||
@@ -32,7 +32,7 @@ esp-backtrace = { version = "0.19.0", features = [
|
|||||||
esp-println = { version = "0.17.0", features = ["defmt-espflash", "esp32c6"] }
|
esp-println = { version = "0.17.0", features = ["defmt-espflash", "esp32c6"] }
|
||||||
|
|
||||||
critical-section = "1.2.0"
|
critical-section = "1.2.0"
|
||||||
static_cell = "2.1.1"
|
static_cell = "2.1.1"
|
||||||
|
|
||||||
|
|
||||||
# For fine tuning these settings, please refer to https://doc.rust-lang.org/cargo/reference/profiles.html
|
# For fine tuning these settings, please refer to https://doc.rust-lang.org/cargo/reference/profiles.html
|
||||||
@@ -42,7 +42,7 @@ static_cell = "2.1.1"
|
|||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1 # LLVM can perform better optimizations using a single thread
|
codegen-units = 1 # LLVM can perform better optimizations using a single thread
|
||||||
debug = 2 # prefer slower builds but better debugging experience
|
debug = 2 # prefer slower builds but better debugging experience
|
||||||
lto = 'fat'
|
lto = 'fat'
|
||||||
opt-level = 's'
|
opt-level = 's'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "stable"
|
channel = "stable"
|
||||||
components = ["rust-src"]
|
components = ["rust-src"]
|
||||||
targets = ["riscv32imac-unknown-none-elf"]
|
targets = ["riscv32imac-unknown-none-elf"]
|
||||||
|
|||||||
+3
-3
@@ -199,9 +199,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Formatter for nix files, available through 'nix fmt'
|
# Formatter for nix files, available through 'nix fmt'
|
||||||
treefmt = lib.mkIf cfg.formatter.enable {
|
treefmt.programs = lib.mkIf cfg.formatter.enable {
|
||||||
programs.alejandra.enable = lib.mkIf cfg.formatter.nix true;
|
alejandra.enable = lib.mkIf cfg.formatter.nix true;
|
||||||
programs.rustfmt = lib.mkIf cfg.formatter.rust {
|
rustfmt = lib.mkIf cfg.formatter.rust {
|
||||||
enable = true;
|
enable = true;
|
||||||
edition = manifest.edition;
|
edition = manifest.edition;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[global]
|
||||||
|
disable = [
|
||||||
|
# line length limits
|
||||||
|
"MD013",
|
||||||
|
]
|
||||||
|
|
||||||
|
[MD057]
|
||||||
|
absolute-links = "relative_to_roots"
|
||||||
@@ -15,4 +15,3 @@ tracing-subscriber = "*"
|
|||||||
|
|
||||||
clap = { version = "*", features = ["derive"] }
|
clap = { version = "*", features = ["derive"] }
|
||||||
figment = { version = "*", features = ["toml", "env", "json"] }
|
figment = { version = "*", features = ["toml", "env", "json"] }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user