diff --git a/Cargo.lock b/Cargo.lock index 5ebb9f15..ec93f9d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1362,11 +1362,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.5.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.25.8+spec-1.1.0", + "toml_edit", ] [[package]] @@ -1720,8 +1720,8 @@ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.11", - "toml_edit 0.22.27", + "toml_datetime", + "toml_edit", ] [[package]] @@ -1733,15 +1733,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_datetime" -version = "1.1.0+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f" -dependencies = [ - "serde_core", -] - [[package]] name = "toml_edit" version = "0.22.27" @@ -1751,30 +1742,9 @@ dependencies = [ "indexmap", "serde", "serde_spanned", - "toml_datetime 0.6.11", + "toml_datetime", "toml_write", - "winnow 0.7.15", -] - -[[package]] -name = "toml_edit" -version = "0.25.8+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c" -dependencies = [ - "indexmap", - "toml_datetime 1.1.0+spec-1.1.0", - "toml_parser", - "winnow 1.0.0", -] - -[[package]] -name = "toml_parser" -version = "1.1.0+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011" -dependencies = [ - "winnow 1.0.0", + "winnow", ] [[package]] @@ -1914,15 +1884,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" -dependencies = [ - "memchr", -] - [[package]] name = "xtensa-lx" version = "0.9.0" diff --git a/Justfile b/Justfile index 0c04cf63..b57e877b 100644 --- a/Justfile +++ b/Justfile @@ -1,8 +1,8 @@ set shell := ["bash", "-c"] # Board definitions: feature target chip -# Xtensa targets require the esp toolchain (espup); check-all gracefully skips -# boards whose toolchain isn't installed. +# Xtensa targets use nightly cargo + esp rustc + -Zbuild-std=core. +# check-all gracefully skips boards whose toolchain isn't installed. heltec_v3 := "heltec_v3 xtensa-esp32s3-none-elf esp32s3" rak_4631 := "rak_4631 thumbv7em-none-eabihf nRF52840_xxAA" @@ -29,9 +29,9 @@ check board: # Run clippy on a single board clippy board: @read -r feat target chip <<< "$(just _info {{board}})"; \ - tc=""; \ - case "$target" in xtensa-*) tc="+esp" ;; esac; \ - cargo $tc clippy --target $target --features $feat -- -D warnings + env=""; extra=""; \ + case "$target" in xtensa-*) env="RUSTC=$(rustup which rustc --toolchain esp)"; extra="+nightly -Zbuild-std=core";; esac; \ + eval $env cargo $extra clippy --target $target --features $feat -- -D warnings # Build release firmware and copy to firmware/ with a readable name build board profile="release": @@ -50,13 +50,14 @@ size board: # ── Private helpers ─────────────────────────────────────────────────── -# Run a cargo command for a board, using +esp toolchain for Xtensa targets +# Run a cargo command for a board. +# Xtensa: nightly cargo + esp rustc (via RUSTC override) + -Zbuild-std=core [private] _cargo board cmd: @read -r feat target chip <<< "$(just _info {{board}})"; \ - tc=""; \ - case "$target" in xtensa-*) tc="+esp" ;; esac; \ - cargo $tc {{cmd}} --target $target --features $feat + env=""; extra=""; \ + case "$target" in xtensa-*) env="RUSTC=$(rustup which rustc --toolchain esp)"; extra="+nightly -Zbuild-std=core";; esac; \ + eval $env cargo $extra {{cmd}} --target $target --features $feat # Check if a board's toolchain is available [private]