From abc8e450f936567ad42cb34b5d2a7941b206aa5d Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 6 Oct 2025 22:55:38 +0200 Subject: Edition 2024. --- .github/ci/build-nightly.sh | 2 +- .github/ci/build-xtensa.sh | 2 +- .github/ci/build.sh | 2 +- .github/ci/doc.sh | 2 +- .github/ci/janitor.sh | 2 +- .github/ci/rustfmt.sh | 2 +- cyw43-pio/Cargo.toml | 2 +- cyw43/Cargo.toml | 2 +- cyw43/src/lib.rs | 1 + .../layer-by-layer/blinky-async/Cargo.toml | 2 +- docs/examples/layer-by-layer/blinky-hal/Cargo.toml | 2 +- docs/examples/layer-by-layer/blinky-irq/Cargo.toml | 2 +- docs/examples/layer-by-layer/blinky-pac/Cargo.toml | 2 +- embassy-boot-nrf/Cargo.toml | 2 +- embassy-boot-nrf/src/lib.rs | 1 + embassy-boot-rp/Cargo.toml | 2 +- embassy-boot-rp/src/lib.rs | 1 + embassy-boot-stm32/Cargo.toml | 2 +- embassy-boot-stm32/src/lib.rs | 1 + embassy-boot/Cargo.toml | 2 +- embassy-boot/src/boot_loader.rs | 2 +- embassy-boot/src/firmware_updater/asynch.rs | 2 +- embassy-boot/src/firmware_updater/blocking.rs | 2 +- embassy-boot/src/lib.rs | 1 + embassy-embedded-hal/Cargo.toml | 2 +- embassy-executor-macros/Cargo.toml | 2 +- embassy-executor-macros/src/macros/main.rs | 2 +- embassy-executor-timer-queue/Cargo.toml | 2 +- embassy-executor/Cargo.toml | 4 +- embassy-executor/src/arch/avr.rs | 2 +- embassy-executor/src/arch/cortex_ar.rs | 2 +- embassy-executor/src/arch/cortex_m.rs | 2 +- embassy-executor/src/arch/riscv32.rs | 2 +- embassy-executor/src/arch/spin.rs | 2 +- embassy-executor/src/arch/std.rs | 2 +- embassy-executor/src/arch/wasm.rs | 2 +- embassy-executor/src/lib.rs | 1 + embassy-executor/src/raw/mod.rs | 6 +-- embassy-executor/src/raw/waker_turbo.rs | 2 +- embassy-executor/tests/test.rs | 2 +- embassy-executor/tests/ui/task_safety_attribute.rs | 2 +- embassy-futures/Cargo.toml | 2 +- embassy-hal-internal/Cargo.toml | 2 +- embassy-hal-internal/src/lib.rs | 1 + embassy-hal-internal/src/macros.rs | 2 +- embassy-imxrt/Cargo.toml | 2 +- embassy-imxrt/src/lib.rs | 3 +- embassy-mspm0/Cargo.toml | 2 +- embassy-mspm0/build.rs | 2 +- embassy-mspm0/src/gpio.rs | 6 +-- embassy-mspm0/src/lib.rs | 3 +- embassy-net-adin1110/Cargo.toml | 2 +- embassy-net-driver-channel/Cargo.toml | 2 +- embassy-net-driver/Cargo.toml | 2 +- embassy-net-driver/src/lib.rs | 1 + embassy-net-enc28j60/Cargo.toml | 2 +- embassy-net-esp-hosted/Cargo.toml | 2 +- embassy-net-nrf91/Cargo.toml | 2 +- embassy-net-nrf91/src/lib.rs | 1 + embassy-net-ppp/Cargo.toml | 2 +- embassy-net-tuntap/Cargo.toml | 2 +- embassy-net-wiznet/Cargo.toml | 2 +- embassy-net/Cargo.toml | 2 +- embassy-net/src/lib.rs | 1 + embassy-nrf/Cargo.toml | 2 +- embassy-nrf/src/lib.rs | 3 +- embassy-nxp/Cargo.toml | 2 +- embassy-nxp/src/lib.rs | 3 +- embassy-rp/Cargo.toml | 6 +-- embassy-rp/src/bootsel.rs | 2 +- embassy-rp/src/flash.rs | 6 +-- embassy-rp/src/intrinsics.rs | 6 +-- embassy-rp/src/lib.rs | 14 +++--- embassy-rp/src/multicore.rs | 5 +-- embassy-rp/src/psram.rs | 8 ++-- embassy-stm32-wpan/Cargo.toml | 2 +- embassy-stm32-wpan/src/lib.rs | 1 + embassy-stm32-wpan/src/tables.rs | 50 +++++++++++----------- embassy-stm32/Cargo.toml | 2 +- embassy-stm32/src/lib.rs | 5 ++- embassy-sync/Cargo.toml | 2 +- embassy-sync/src/lib.rs | 1 + embassy-time-driver/Cargo.toml | 2 +- embassy-time-driver/src/lib.rs | 8 ++-- embassy-time-queue-utils/Cargo.toml | 2 +- embassy-time/Cargo.toml | 2 +- embassy-time/src/lib.rs | 1 + embassy-usb-dfu/Cargo.toml | 2 +- embassy-usb-driver/Cargo.toml | 2 +- embassy-usb-driver/src/lib.rs | 1 + embassy-usb-logger/Cargo.toml | 2 +- embassy-usb-synopsys-otg/Cargo.toml | 2 +- embassy-usb-synopsys-otg/src/lib.rs | 1 + embassy-usb/Cargo.toml | 2 +- embassy-usb/src/lib.rs | 1 + examples/boot/application/nrf/Cargo.toml | 2 +- examples/boot/application/rp/Cargo.toml | 2 +- examples/boot/application/stm32f3/Cargo.toml | 2 +- examples/boot/application/stm32f7/Cargo.toml | 2 +- examples/boot/application/stm32h7/Cargo.toml | 2 +- examples/boot/application/stm32l0/Cargo.toml | 2 +- examples/boot/application/stm32l1/Cargo.toml | 2 +- examples/boot/application/stm32l4/Cargo.toml | 2 +- examples/boot/application/stm32wb-dfu/Cargo.toml | 2 +- examples/boot/application/stm32wba-dfu/Cargo.toml | 2 +- examples/boot/application/stm32wl/Cargo.toml | 2 +- examples/boot/bootloader/nrf/Cargo.toml | 2 +- examples/boot/bootloader/nrf/src/main.rs | 6 +-- examples/boot/bootloader/rp/Cargo.toml | 2 +- examples/boot/bootloader/rp/src/main.rs | 6 +-- .../boot/bootloader/stm32-dual-bank/Cargo.toml | 2 +- .../boot/bootloader/stm32-dual-bank/src/main.rs | 6 +-- examples/boot/bootloader/stm32/Cargo.toml | 2 +- examples/boot/bootloader/stm32/src/main.rs | 6 +-- examples/boot/bootloader/stm32wb-dfu/Cargo.toml | 2 +- examples/boot/bootloader/stm32wb-dfu/src/main.rs | 6 +-- examples/boot/bootloader/stm32wba-dfu/Cargo.toml | 2 +- examples/boot/bootloader/stm32wba-dfu/src/main.rs | 6 +-- examples/lpc55s69/Cargo.toml | 2 +- examples/mimxrt1011/Cargo.toml | 2 +- examples/mimxrt1011/src/lib.rs | 2 +- examples/mimxrt1062-evk/Cargo.toml | 2 +- examples/mimxrt1062-evk/src/lib.rs | 4 +- examples/mimxrt6/Cargo.toml | 2 +- examples/mspm0c1104/Cargo.toml | 2 +- examples/mspm0g3507/Cargo.toml | 2 +- examples/mspm0g3519/Cargo.toml | 2 +- examples/mspm0l1306/Cargo.toml | 2 +- examples/mspm0l2228/Cargo.toml | 2 +- examples/nrf-rtos-trace/Cargo.toml | 2 +- examples/nrf51/Cargo.toml | 2 +- examples/nrf52810/Cargo.toml | 2 +- examples/nrf52840-edf/Cargo.toml | 2 +- examples/nrf52840-rtic/Cargo.toml | 2 +- examples/nrf52840/Cargo.toml | 2 +- examples/nrf52840/src/bin/multiprio.rs | 4 +- examples/nrf52840/src/bin/raw_spawn.rs | 2 +- examples/nrf5340/Cargo.toml | 2 +- examples/nrf54l15/Cargo.toml | 2 +- examples/nrf9151/ns/Cargo.toml | 2 +- examples/nrf9151/s/Cargo.toml | 2 +- examples/nrf9160/Cargo.toml | 2 +- examples/nrf9160/src/bin/modem_tcp_client.rs | 2 +- examples/rp/Cargo.toml | 2 +- examples/rp/src/bin/multiprio.rs | 4 +- examples/rp/src/bin/sharing.rs | 2 +- examples/rp235x/Cargo.toml | 2 +- examples/rp235x/src/bin/multiprio.rs | 4 +- examples/rp235x/src/bin/sharing.rs | 2 +- examples/std/Cargo.toml | 2 +- examples/stm32c0/Cargo.toml | 2 +- examples/stm32f0/Cargo.toml | 2 +- examples/stm32f0/src/bin/multiprio.rs | 4 +- examples/stm32f1/Cargo.toml | 2 +- examples/stm32f2/Cargo.toml | 2 +- examples/stm32f3/Cargo.toml | 2 +- examples/stm32f3/src/bin/multiprio.rs | 4 +- examples/stm32f334/Cargo.toml | 2 +- examples/stm32f4/Cargo.toml | 2 +- examples/stm32f4/src/bin/multiprio.rs | 4 +- examples/stm32f469/Cargo.toml | 2 +- examples/stm32f7/Cargo.toml | 2 +- examples/stm32g0/Cargo.toml | 2 +- examples/stm32g4/Cargo.toml | 2 +- examples/stm32h5/Cargo.toml | 2 +- examples/stm32h7/Cargo.toml | 2 +- examples/stm32h7/src/bin/multiprio.rs | 4 +- examples/stm32h723/Cargo.toml | 2 +- examples/stm32h735/Cargo.toml | 2 +- examples/stm32h742/Cargo.toml | 2 +- examples/stm32h755cm4/Cargo.toml | 2 +- examples/stm32h755cm4/src/bin/intercore.rs | 4 +- examples/stm32h755cm7/Cargo.toml | 2 +- examples/stm32h755cm7/src/bin/intercore.rs | 4 +- examples/stm32h7b0/Cargo.toml | 2 +- examples/stm32h7rs/Cargo.toml | 2 +- examples/stm32h7rs/src/bin/multiprio.rs | 4 +- examples/stm32l0/Cargo.toml | 2 +- examples/stm32l0/src/bin/raw_spawn.rs | 2 +- examples/stm32l1/Cargo.toml | 2 +- examples/stm32l4/Cargo.toml | 2 +- examples/stm32l432/Cargo.toml | 2 +- examples/stm32l5/Cargo.toml | 2 +- examples/stm32u0/Cargo.toml | 2 +- examples/stm32u5/Cargo.toml | 2 +- examples/stm32wb/Cargo.toml | 2 +- examples/stm32wba/Cargo.toml | 2 +- examples/stm32wba6/Cargo.toml | 2 +- examples/stm32wl/Cargo.toml | 2 +- examples/wasm/Cargo.toml | 2 +- rustfmt.toml | 2 +- tests/mspm0/Cargo.toml | 2 +- tests/nrf/Cargo.toml | 2 +- tests/perf-client/Cargo.toml | 2 +- tests/perf-server/Cargo.toml | 2 +- tests/riscv32/Cargo.toml | 2 +- tests/rp/Cargo.toml | 2 +- tests/stm32/Cargo.toml | 2 +- tests/utils/Cargo.toml | 2 +- 199 files changed, 278 insertions(+), 254 deletions(-) diff --git a/.github/ci/build-nightly.sh b/.github/ci/build-nightly.sh index 8cca1b445..82e9436f3 100755 --- a/.github/ci/build-nightly.sh +++ b/.github/ci/build-nightly.sh @@ -23,7 +23,7 @@ fi hashtime restore /ci/cache/filetime.json || true hashtime save /ci/cache/filetime.json -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev d015fd5e972a3e550ebef0da6748099b88a93ba6 ./ci-nightly.sh diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index dbd2f7ffc..3f74b4a5a 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh @@ -25,7 +25,7 @@ fi hashtime restore /ci/cache/filetime.json || true hashtime save /ci/cache/filetime.json -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev d015fd5e972a3e550ebef0da6748099b88a93ba6 ./ci-xtensa.sh diff --git a/.github/ci/build.sh b/.github/ci/build.sh index d5e0e0bd2..3c196f72b 100755 --- a/.github/ci/build.sh +++ b/.github/ci/build.sh @@ -28,7 +28,7 @@ fi hashtime restore /ci/cache/filetime.json || true hashtime save /ci/cache/filetime.json -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev d015fd5e972a3e550ebef0da6748099b88a93ba6 ./ci.sh diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index dab47e86d..535fc5262 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh @@ -12,7 +12,7 @@ export CARGO_TARGET_DIR=/ci/cache/target export PATH=$CARGO_HOME/bin:$PATH mv rust-toolchain-nightly.toml rust-toolchain.toml -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev d015fd5e972a3e550ebef0da6748099b88a93ba6 cargo embassy-devtool doc -o webroot diff --git a/.github/ci/janitor.sh b/.github/ci/janitor.sh index 305c6b227..bc43075bd 100755 --- a/.github/ci/janitor.sh +++ b/.github/ci/janitor.sh @@ -9,7 +9,7 @@ export CARGO_HOME=/ci/cache/cargo export CARGO_TARGET_DIR=/ci/cache/target export PATH=$CARGO_HOME/bin:$PATH -cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 676e6d602bf016dc71f1e98f2c7f191d7bd20707 +cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev d015fd5e972a3e550ebef0da6748099b88a93ba6 cargo embassy-devtool check-crlf cargo embassy-devtool check-manifest diff --git a/.github/ci/rustfmt.sh b/.github/ci/rustfmt.sh index 369239cfe..7aaf93234 100755 --- a/.github/ci/rustfmt.sh +++ b/.github/ci/rustfmt.sh @@ -9,4 +9,4 @@ export CARGO_HOME=/ci/cache/cargo export CARGO_TARGET_DIR=/ci/cache/target mv rust-toolchain-nightly.toml rust-toolchain.toml -find . -name '*.rs' -not -path '*target*' | xargs rustfmt --check --skip-children --unstable-features --edition 2021 +find . -name '*.rs' -not -path '*target*' | xargs rustfmt --check --skip-children --unstable-features --edition 2024 diff --git a/cyw43-pio/Cargo.toml b/cyw43-pio/Cargo.toml index 6ab5c453e..a10a091e9 100644 --- a/cyw43-pio/Cargo.toml +++ b/cyw43-pio/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cyw43-pio" version = "0.8.0" -edition = "2021" +edition = "2024" description = "RP2040 PIO SPI implementation for cyw43" keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] diff --git a/cyw43/Cargo.toml b/cyw43/Cargo.toml index c59c15a71..314427611 100644 --- a/cyw43/Cargo.toml +++ b/cyw43/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cyw43" version = "0.5.0" -edition = "2021" +edition = "2024" description = "Rust driver for the CYW43439 WiFi chip, used in the Raspberry Pi Pico W." keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] diff --git a/cyw43/src/lib.rs b/cyw43/src/lib.rs index 16b436e66..82c636346 100644 --- a/cyw43/src/lib.rs +++ b/cyw43/src/lib.rs @@ -1,6 +1,7 @@ #![no_std] #![no_main] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![deny(unused_must_use)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/docs/examples/layer-by-layer/blinky-async/Cargo.toml b/docs/examples/layer-by-layer/blinky-async/Cargo.toml index ec718022c..797ae3097 100644 --- a/docs/examples/layer-by-layer/blinky-async/Cargo.toml +++ b/docs/examples/layer-by-layer/blinky-async/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "blinky-async" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/docs/examples/layer-by-layer/blinky-hal/Cargo.toml b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml index 4a0b03a83..802b8b32e 100644 --- a/docs/examples/layer-by-layer/blinky-hal/Cargo.toml +++ b/docs/examples/layer-by-layer/blinky-hal/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "blinky-hal" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/docs/examples/layer-by-layer/blinky-irq/Cargo.toml b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml index 3c4bf8446..d1b893a1e 100644 --- a/docs/examples/layer-by-layer/blinky-irq/Cargo.toml +++ b/docs/examples/layer-by-layer/blinky-irq/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "blinky-irq" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/docs/examples/layer-by-layer/blinky-pac/Cargo.toml b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml index 0d4711da2..fa093a3af 100644 --- a/docs/examples/layer-by-layer/blinky-pac/Cargo.toml +++ b/docs/examples/layer-by-layer/blinky-pac/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "blinky-pac" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/embassy-boot-nrf/Cargo.toml b/embassy-boot-nrf/Cargo.toml index 466f18631..787a28d70 100644 --- a/embassy-boot-nrf/Cargo.toml +++ b/embassy-boot-nrf/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-nrf" version = "0.9.0" description = "Bootloader lib for nRF chips" diff --git a/embassy-boot-nrf/src/lib.rs b/embassy-boot-nrf/src/lib.rs index f1c9da080..3b3434e2c 100644 --- a/embassy-boot-nrf/src/lib.rs +++ b/embassy-boot-nrf/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] mod fmt; diff --git a/embassy-boot-rp/Cargo.toml b/embassy-boot-rp/Cargo.toml index 894b77595..e80c79374 100644 --- a/embassy-boot-rp/Cargo.toml +++ b/embassy-boot-rp/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-rp" version = "0.8.0" description = "Bootloader lib for RP2040 chips" diff --git a/embassy-boot-rp/src/lib.rs b/embassy-boot-rp/src/lib.rs index f704380ef..dd049851a 100644 --- a/embassy-boot-rp/src/lib.rs +++ b/embassy-boot-rp/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] mod fmt; diff --git a/embassy-boot-stm32/Cargo.toml b/embassy-boot-stm32/Cargo.toml index 24eafcdbf..c8c7f4409 100644 --- a/embassy-boot-stm32/Cargo.toml +++ b/embassy-boot-stm32/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32" version = "0.6.0" description = "Bootloader lib for STM32 chips" diff --git a/embassy-boot-stm32/src/lib.rs b/embassy-boot-stm32/src/lib.rs index 387cc0ce5..ee6ae41b7 100644 --- a/embassy-boot-stm32/src/lib.rs +++ b/embassy-boot-stm32/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] mod fmt; diff --git a/embassy-boot/Cargo.toml b/embassy-boot/Cargo.toml index a18438c81..8c5c1f633 100644 --- a/embassy-boot/Cargo.toml +++ b/embassy-boot/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot" version = "0.6.1" description = "A lightweight bootloader supporting firmware updates in a power-fail-safe way, with trial boots and rollbacks." diff --git a/embassy-boot/src/boot_loader.rs b/embassy-boot/src/boot_loader.rs index 5bffdc5ea..8d97882ea 100644 --- a/embassy-boot/src/boot_loader.rs +++ b/embassy-boot/src/boot_loader.rs @@ -94,7 +94,7 @@ impl<'a, ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> dfu_flash: &'a Mutex>, state_flash: &'a Mutex>, ) -> Self { - extern "C" { + unsafe extern "C" { static __bootloader_state_start: u32; static __bootloader_state_end: u32; static __bootloader_active_start: u32; diff --git a/embassy-boot/src/firmware_updater/asynch.rs b/embassy-boot/src/firmware_updater/asynch.rs index 66e311e38..fd02fa526 100644 --- a/embassy-boot/src/firmware_updater/asynch.rs +++ b/embassy-boot/src/firmware_updater/asynch.rs @@ -25,7 +25,7 @@ impl<'a, DFU: NorFlash, STATE: NorFlash> dfu_flash: &'a embassy_sync::mutex::Mutex, state_flash: &'a embassy_sync::mutex::Mutex, ) -> Self { - extern "C" { + unsafe extern "C" { static __bootloader_state_start: u32; static __bootloader_state_end: u32; static __bootloader_dfu_start: u32; diff --git a/embassy-boot/src/firmware_updater/blocking.rs b/embassy-boot/src/firmware_updater/blocking.rs index 0fedac1ea..44550e795 100644 --- a/embassy-boot/src/firmware_updater/blocking.rs +++ b/embassy-boot/src/firmware_updater/blocking.rs @@ -55,7 +55,7 @@ impl<'a, DFU: NorFlash, STATE: NorFlash> dfu_flash: &'a embassy_sync::blocking_mutex::Mutex>, state_flash: &'a embassy_sync::blocking_mutex::Mutex>, ) -> Self { - extern "C" { + unsafe extern "C" { static __bootloader_state_start: u32; static __bootloader_state_end: u32; static __bootloader_dfu_start: u32; diff --git a/embassy-boot/src/lib.rs b/embassy-boot/src/lib.rs index e2c4cf771..4d7ebfc4f 100644 --- a/embassy-boot/src/lib.rs +++ b/embassy-boot/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] mod fmt; diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml index 8b8122567..c9551257a 100644 --- a/embassy-embedded-hal/Cargo.toml +++ b/embassy-embedded-hal/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-embedded-hal" version = "0.5.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Collection of utilities to use `embedded-hal` and `embedded-storage` traits with Embassy." repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-executor-macros/Cargo.toml b/embassy-executor-macros/Cargo.toml index 9c2b40d03..3eeed5e4d 100644 --- a/embassy-executor-macros/Cargo.toml +++ b/embassy-executor-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-executor-macros" version = "0.7.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "macros for creating the entry point and tasks for embassy-executor" repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-executor-macros/src/macros/main.rs b/embassy-executor-macros/src/macros/main.rs index dc470e51c..3d52ebfe1 100644 --- a/embassy-executor-macros/src/macros/main.rs +++ b/embassy-executor-macros/src/macros/main.rs @@ -183,7 +183,7 @@ For example: `#[embassy_executor::main(entry = ..., executor = \"some_crate::Exe quote!(!), quote! { unsafe fn __make_static(t: &mut T) -> &'static mut T { - ::core::mem::transmute(t) + unsafe { ::core::mem::transmute(t) } } let mut executor = #executor::new(); diff --git a/embassy-executor-timer-queue/Cargo.toml b/embassy-executor-timer-queue/Cargo.toml index a0ac44420..6770ab26e 100644 --- a/embassy-executor-timer-queue/Cargo.toml +++ b/embassy-executor-timer-queue/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-executor-timer-queue" version = "0.1.0" -edition = "2021" +edition = "2024" description = "Timer queue item and interface between embassy-executor and timer queues" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-executor-timer-queue" diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml index 6d11bc076..ecc4b6338 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-executor" version = "0.9.1" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "async/await executor designed for embedded usage" repository = "https://github.com/embassy-rs/embassy" @@ -30,6 +30,8 @@ build = [ {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "embassy-time-driver", "scheduler-deadline"]}, {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-priority", "scheduler-deadline"]}, {target = "thumbv7em-none-eabi", features = ["arch-cortex-m", "executor-interrupt", "executor-thread", "scheduler-deadline"]}, + {target = "thumbv7em-none-eabi", features = ["arch-spin"]}, + {target = "thumbv7em-none-eabi", features = ["arch-spin", "scheduler-deadline"]}, {target = "armv7a-none-eabi", features = ["arch-cortex-ar", "executor-thread"]}, {target = "armv7r-none-eabi", features = ["arch-cortex-ar", "executor-thread"]}, {target = "armv7r-none-eabihf", features = ["arch-cortex-ar", "executor-thread"]}, diff --git a/embassy-executor/src/arch/avr.rs b/embassy-executor/src/arch/avr.rs index 70085d04d..4a19c523a 100644 --- a/embassy-executor/src/arch/avr.rs +++ b/embassy-executor/src/arch/avr.rs @@ -14,7 +14,7 @@ mod thread { static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); - #[export_name = "__pender"] + #[unsafe(export_name = "__pender")] fn __pender(_context: *mut ()) { SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); } diff --git a/embassy-executor/src/arch/cortex_ar.rs b/embassy-executor/src/arch/cortex_ar.rs index f9e2f3f7c..36d45944a 100644 --- a/embassy-executor/src/arch/cortex_ar.rs +++ b/embassy-executor/src/arch/cortex_ar.rs @@ -1,7 +1,7 @@ #[cfg(feature = "executor-interrupt")] compile_error!("`executor-interrupt` is not supported with `arch-cortex-ar`."); -#[export_name = "__pender"] +#[unsafe(export_name = "__pender")] #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] fn __pender(context: *mut ()) { // `context` is always `usize::MAX` created by `Executor::run`. diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs index 1c9ddd8a0..9f1081e93 100644 --- a/embassy-executor/src/arch/cortex_m.rs +++ b/embassy-executor/src/arch/cortex_m.rs @@ -1,4 +1,4 @@ -#[export_name = "__pender"] +#[unsafe(export_name = "__pender")] #[cfg(any(feature = "executor-thread", feature = "executor-interrupt"))] fn __pender(context: *mut ()) { unsafe { diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs index 01e63a9fd..13b93cf02 100644 --- a/embassy-executor/src/arch/riscv32.rs +++ b/embassy-executor/src/arch/riscv32.rs @@ -15,7 +15,7 @@ mod thread { /// global atomic used to keep track of whether there is work to do since sev() is not available on RISCV static SIGNAL_WORK_THREAD_MODE: AtomicBool = AtomicBool::new(false); - #[export_name = "__pender"] + #[unsafe(export_name = "__pender")] fn __pender(_context: *mut ()) { SIGNAL_WORK_THREAD_MODE.store(true, Ordering::SeqCst); } diff --git a/embassy-executor/src/arch/spin.rs b/embassy-executor/src/arch/spin.rs index 340023620..40cb56a09 100644 --- a/embassy-executor/src/arch/spin.rs +++ b/embassy-executor/src/arch/spin.rs @@ -11,7 +11,7 @@ mod thread { use crate::{raw, Spawner}; - #[export_name = "__pender"] + #[unsafe(export_name = "__pender")] fn __pender(_context: *mut ()) {} /// Spin Executor diff --git a/embassy-executor/src/arch/std.rs b/embassy-executor/src/arch/std.rs index b02b15988..cdb9f7642 100644 --- a/embassy-executor/src/arch/std.rs +++ b/embassy-executor/src/arch/std.rs @@ -12,7 +12,7 @@ mod thread { use crate::{raw, Spawner}; - #[export_name = "__pender"] + #[unsafe(export_name = "__pender")] fn __pender(context: *mut ()) { let signaler: &'static Signaler = unsafe { std::mem::transmute(context) }; signaler.signal() diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs index f9d0f935c..6b36f8a5b 100644 --- a/embassy-executor/src/arch/wasm.rs +++ b/embassy-executor/src/arch/wasm.rs @@ -15,7 +15,7 @@ mod thread { use crate::raw::util::UninitCell; use crate::{raw, Spawner}; - #[export_name = "__pender"] + #[unsafe(export_name = "__pender")] fn __pender(context: *mut ()) { let signaler: &'static WasmContext = unsafe { std::mem::transmute(context) }; let _ = signaler.promise.then(unsafe { signaler.closure.as_mut() }); diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index e47b8eb9f..cffc76699 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(not(any(feature = "arch-std", feature = "arch-wasm")), no_std)] #![allow(clippy::new_without_default)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index dbd70cbf4..ab845ed3b 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs @@ -52,7 +52,7 @@ pub use self::waker::task_from_waker; use super::SpawnToken; use crate::{Metadata, SpawnError}; -#[no_mangle] +#[unsafe(no_mangle)] extern "Rust" fn __embassy_time_queue_item_from_waker(waker: &Waker) -> &'static mut TimerQueueItem { unsafe { task_from_waker(waker).timer_queue_item() } } @@ -407,7 +407,7 @@ unsafe impl Sync for Pender {} impl Pender { pub(crate) fn pend(self) { - extern "Rust" { + unsafe extern "Rust" { fn __pender(context: *mut ()); } unsafe { __pender(self.0) }; @@ -507,7 +507,7 @@ impl SyncExecutor { /// The pender function must be exported with the name `__pender` and have the following signature: /// /// ```rust -/// #[export_name = "__pender"] +/// #[unsafe(export_name = "__pender")] /// fn pender(context: *mut ()) { /// // schedule `poll()` to be called /// } diff --git a/embassy-executor/src/raw/waker_turbo.rs b/embassy-executor/src/raw/waker_turbo.rs index 435a0ff7e..9d0ad35ec 100644 --- a/embassy-executor/src/raw/waker_turbo.rs +++ b/embassy-executor/src/raw/waker_turbo.rs @@ -26,7 +26,7 @@ pub fn task_from_waker(waker: &Waker) -> TaskRef { } #[inline(never)] -#[no_mangle] +#[unsafe(no_mangle)] fn _turbo_wake(ptr: NonNull<()>) { // safety: our wakers are always created with `TaskRef::as_ptr` let task = unsafe { TaskRef::from_ptr(ptr.as_ptr() as *const TaskHeader) }; diff --git a/embassy-executor/tests/test.rs b/embassy-executor/tests/test.rs index 6baf3dc21..6c4783dc1 100644 --- a/embassy-executor/tests/test.rs +++ b/embassy-executor/tests/test.rs @@ -9,7 +9,7 @@ use std::task::Poll; use embassy_executor::raw::Executor; use embassy_executor::{task, Spawner}; -#[export_name = "__pender"] +#[unsafe(export_name = "__pender")] fn __pender(context: *mut ()) { unsafe { let trace = &*(context as *const Trace); diff --git a/embassy-executor/tests/ui/task_safety_attribute.rs b/embassy-executor/tests/ui/task_safety_attribute.rs index ab5a2f99f..46a5c665f 100644 --- a/embassy-executor/tests/ui/task_safety_attribute.rs +++ b/embassy-executor/tests/ui/task_safety_attribute.rs @@ -9,7 +9,7 @@ async fn safe() {} #[embassy_executor::task] async unsafe fn not_safe() {} -#[export_name = "__pender"] +#[unsafe(export_name = "__pender")] fn pender(_: *mut ()) { // The test doesn't link if we don't include this. // We never call this anyway. diff --git a/embassy-futures/Cargo.toml b/embassy-futures/Cargo.toml index 07d5219cf..d344e5c4b 100644 --- a/embassy-futures/Cargo.toml +++ b/embassy-futures/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-futures" version = "0.1.2" -edition = "2021" +edition = "2024" description = "no-std, no-alloc utilities for working with futures" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-futures" diff --git a/embassy-hal-internal/Cargo.toml b/embassy-hal-internal/Cargo.toml index 11dcc2466..c2e0bd30f 100644 --- a/embassy-hal-internal/Cargo.toml +++ b/embassy-hal-internal/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-hal-internal" version = "0.3.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Internal implementation details for Embassy HALs. DO NOT USE DIRECTLY." repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-hal-internal/src/lib.rs b/embassy-hal-internal/src/lib.rs index 7addb71e2..729f97f0c 100644 --- a/embassy-hal-internal/src/lib.rs +++ b/embassy-hal-internal/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(clippy::new_without_default)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/embassy-hal-internal/src/macros.rs b/embassy-hal-internal/src/macros.rs index ce72ded5c..0fcca2baf 100644 --- a/embassy-hal-internal/src/macros.rs +++ b/embassy-hal-internal/src/macros.rs @@ -58,7 +58,7 @@ macro_rules! peripherals_struct { ///Returns all the peripherals *once* #[inline] pub(crate) fn take_with_cs(_cs: critical_section::CriticalSection) -> Self { - #[no_mangle] + #[unsafe(no_mangle)] static mut _EMBASSY_DEVICE_PERIPHERALS: bool = false; // safety: OK because we're inside a CS. diff --git a/embassy-imxrt/Cargo.toml b/embassy-imxrt/Cargo.toml index 7561640dd..c47756f10 100644 --- a/embassy-imxrt/Cargo.toml +++ b/embassy-imxrt/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-imxrt" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Embassy Hardware Abstraction Layer (HAL) for the IMXRT microcontroller" keywords = ["embedded", "async", "imxrt", "rt600", "embedded-hal"] diff --git a/embassy-imxrt/src/lib.rs b/embassy-imxrt/src/lib.rs index a3437c655..00ac9af29 100644 --- a/embassy-imxrt/src/lib.rs +++ b/embassy-imxrt/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] @@ -74,7 +75,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] unsafe extern "C" fn $irq() { unsafe { $( diff --git a/embassy-mspm0/Cargo.toml b/embassy-mspm0/Cargo.toml index 1b32c4d43..65019eb7c 100644 --- a/embassy-mspm0/Cargo.toml +++ b/embassy-mspm0/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-mspm0" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Embassy Hardware Abstraction Layer (HAL) for Texas Instruments MSPM0 series microcontrollers" keywords = ["embedded", "async", "mspm0", "hal", "embedded-hal"] diff --git a/embassy-mspm0/build.rs b/embassy-mspm0/build.rs index d294bc422..93ea81ac3 100644 --- a/embassy-mspm0/build.rs +++ b/embassy-mspm0/build.rs @@ -208,7 +208,7 @@ fn generate_groups() -> TokenStream { #[cfg(feature = "rt")] mod group_vectors { - extern "Rust" { + unsafe extern "Rust" { #(#group_vectors)* } } diff --git a/embassy-mspm0/src/gpio.rs b/embassy-mspm0/src/gpio.rs index d5fd36dbf..4668262a9 100644 --- a/embassy-mspm0/src/gpio.rs +++ b/embassy-mspm0/src/gpio.rs @@ -1125,14 +1125,14 @@ fn GPIOB() { // Defining these as no_mangle is required so that the linker will pick these over the default handler. #[cfg(all(feature = "rt", not(any(mspm0c110x, mspm0c1105_c1106, mspm0l110x))))] -#[no_mangle] +#[unsafe(no_mangle)] #[allow(non_snake_case)] fn GPIOA() { irq_handler(pac::GPIOA, &PORTA_WAKERS); } #[cfg(all(feature = "rt", gpio_pb, not(mspm0c1105_c1106)))] -#[no_mangle] +#[unsafe(no_mangle)] #[allow(non_snake_case)] fn GPIOB() { irq_handler(pac::GPIOB, &PORTB_WAKERS); @@ -1140,7 +1140,7 @@ fn GPIOB() { #[cfg(all(feature = "rt", gpio_pc))] #[allow(non_snake_case)] -#[no_mangle] +#[unsafe(no_mangle)] fn GPIOC() { irq_handler(pac::GPIOC, &PORTC_WAKERS); } diff --git a/embassy-mspm0/src/lib.rs b/embassy-mspm0/src/lib.rs index 13f0ce662..06938c21d 100644 --- a/embassy-mspm0/src/lib.rs +++ b/embassy-mspm0/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] // Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))] #![cfg_attr( @@ -111,7 +112,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] $(#[cfg($cond_irq)])? unsafe extern "C" fn $irq() { unsafe { diff --git a/embassy-net-adin1110/Cargo.toml b/embassy-net-adin1110/Cargo.toml index 587c69eb7..a5655870f 100644 --- a/embassy-net-adin1110/Cargo.toml +++ b/embassy-net-adin1110/Cargo.toml @@ -5,7 +5,7 @@ description = "embassy-net driver for the ADIN1110 ethernet chip" keywords = ["embedded", "ADIN1110", "embassy-net", "embedded-hal-async", "ethernet"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-net-adin1110" diff --git a/embassy-net-driver-channel/Cargo.toml b/embassy-net-driver-channel/Cargo.toml index 1e40c2d87..116057d6e 100644 --- a/embassy-net-driver-channel/Cargo.toml +++ b/embassy-net-driver-channel/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-net-driver-channel" version = "0.3.2" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "High-level channel-based driver for the `embassy-net` async TCP/IP network stack." repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-net-driver/Cargo.toml b/embassy-net-driver/Cargo.toml index a36e412ad..948fb2667 100644 --- a/embassy-net-driver/Cargo.toml +++ b/embassy-net-driver/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-net-driver" version = "0.2.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Driver trait for the `embassy-net` async TCP/IP network stack." repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-net-driver/src/lib.rs b/embassy-net-driver/src/lib.rs index 4c847718d..47babe34a 100644 --- a/embassy-net-driver/src/lib.rs +++ b/embassy-net-driver/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] diff --git a/embassy-net-enc28j60/Cargo.toml b/embassy-net-enc28j60/Cargo.toml index e7bad118b..7c3e05922 100644 --- a/embassy-net-enc28j60/Cargo.toml +++ b/embassy-net-enc28j60/Cargo.toml @@ -5,7 +5,7 @@ description = "embassy-net driver for the ENC28J60 ethernet chip" keywords = ["embedded", "enc28j60", "embassy-net", "embedded-hal-async", "ethernet"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-net-enc28j60" diff --git a/embassy-net-esp-hosted/Cargo.toml b/embassy-net-esp-hosted/Cargo.toml index 149ff2bb2..f148f4762 100644 --- a/embassy-net-esp-hosted/Cargo.toml +++ b/embassy-net-esp-hosted/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-net-esp-hosted" version = "0.2.1" -edition = "2021" +edition = "2024" description = "embassy-net driver for ESP-Hosted" keywords = ["embedded", "esp-hosted", "embassy-net", "embedded-hal-async", "wifi"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] diff --git a/embassy-net-nrf91/Cargo.toml b/embassy-net-nrf91/Cargo.toml index 35fbef3f6..ecb10246a 100644 --- a/embassy-net-nrf91/Cargo.toml +++ b/embassy-net-nrf91/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-net-nrf91" version = "0.1.1" -edition = "2021" +edition = "2024" description = "embassy-net driver for Nordic nRF91-series cellular modems" keywords = ["embedded", "nrf91", "embassy-net", "cellular"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] diff --git a/embassy-net-nrf91/src/lib.rs b/embassy-net-nrf91/src/lib.rs index 0bd9be0d9..8778b65ab 100644 --- a/embassy-net-nrf91/src/lib.rs +++ b/embassy-net-nrf91/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] #![deny(unused_must_use)] diff --git a/embassy-net-ppp/Cargo.toml b/embassy-net-ppp/Cargo.toml index 644f5b827..45ee2f6b5 100644 --- a/embassy-net-ppp/Cargo.toml +++ b/embassy-net-ppp/Cargo.toml @@ -5,7 +5,7 @@ description = "embassy-net driver for PPP over Serial" keywords = ["embedded", "ppp", "embassy-net", "embedded-hal-async", "async"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-net-ppp" diff --git a/embassy-net-tuntap/Cargo.toml b/embassy-net-tuntap/Cargo.toml index 2cd0c0f7e..77668b445 100644 --- a/embassy-net-tuntap/Cargo.toml +++ b/embassy-net-tuntap/Cargo.toml @@ -5,7 +5,7 @@ description = "embassy-net driver for Linux TUN/TAP interfaces." keywords = ["embedded", "tuntap", "embassy-net", "ethernet", "async"] categories = ["embedded", "hardware-support", "network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-net-tuntap" diff --git a/embassy-net-wiznet/Cargo.toml b/embassy-net-wiznet/Cargo.toml index 6e6dccebd..069f46fc3 100644 --- a/embassy-net-wiznet/Cargo.toml +++ b/embassy-net-wiznet/Cargo.toml @@ -5,7 +5,7 @@ description = "embassy-net driver for WIZnet SPI Ethernet chips" keywords = ["embedded", "embassy-net", "embedded-hal-async", "ethernet", "async"] categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"] license = "MIT OR Apache-2.0" -edition = "2021" +edition = "2024" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-net-wiznet" diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 31ce7e9a6..4c8075c43 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-net" version = "0.7.1" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Async TCP/IP network stack for embedded systems" repository = "https://github.com/embassy-rs/embassy" diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 3f0634849..f701f8add 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 362fabcf7..17ffaf439 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-nrf" version = "0.8.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Embassy Hardware Abstraction Layer (HAL) for nRF series microcontrollers" keywords = ["embedded", "async", "nordic", "nrf", "embedded-hal"] diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 716eec961..7a0714cc0 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![cfg_attr( docsrs, doc = "

You might want to browse the `embassy-nrf` documentation on the Embassy website instead.

The documentation here on `docs.rs` is built for a single chip only (nRF52840 in particular), while on the Embassy website you can pick your exact chip from the top menu. Available peripherals and their APIs change depending on the chip.

\n\n" @@ -252,7 +253,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] $(#[cfg($cond_irq)])? unsafe extern "C" fn $irq() { unsafe { diff --git a/embassy-nxp/Cargo.toml b/embassy-nxp/Cargo.toml index f3c828313..33f0f2dff 100644 --- a/embassy-nxp/Cargo.toml +++ b/embassy-nxp/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-nxp" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/embassy-nxp/src/lib.rs b/embassy-nxp/src/lib.rs index f0f0afb6c..617045217 100644 --- a/embassy-nxp/src/lib.rs +++ b/embassy-nxp/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] // This mod MUST go first, so that the others see its macros. pub(crate) mod fmt; @@ -67,7 +68,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] $(#[cfg($cond_irq)])? unsafe extern "C" fn $irq() { unsafe { diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index f6b0900f2..9ad4b47a3 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-rp" version = "0.8.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller" keywords = ["embedded", "async", "rp235x", "rp2040", "embedded-hal"] @@ -104,7 +104,7 @@ boot2-w25x10cl = [] ## Have embassy-rp not provide the boot2 so you can use your own. ## Place your own in the ".boot2" section like: ## ``` -## #[link_section = ".boot2"] +## #[unsafe(link_section = ".boot2")] ## #[used] ## static BOOT2: [u8; 256] = [0; 256]; // Provide your own with e.g. include_bytes! ## ``` @@ -127,7 +127,7 @@ imagedef-nonsecure-exe = [] ## ```ignore ## use embassy_rp::block::ImageDef; ## -## #[link_section = ".start_block"] +## #[unsafe(link_section = ".start_block")] ## #[used] ## static IMAGE_DEF: ImageDef = ImageDef::secure_exe(); // Update this with your own implementation. ## ``` diff --git a/embassy-rp/src/bootsel.rs b/embassy-rp/src/bootsel.rs index 14f9e46aa..5f0bac248 100644 --- a/embassy-rp/src/bootsel.rs +++ b/embassy-rp/src/bootsel.rs @@ -36,7 +36,7 @@ mod ram_helpers { /// This function must live in ram. It uses inline asm to avoid any /// potential calls to ABI functions that might be in flash. #[inline(never)] - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[cfg(target_arch = "arm")] pub unsafe fn read_cs_status() -> GpioStatus { let result: u32; diff --git a/embassy-rp/src/flash.rs b/embassy-rp/src/flash.rs index 8c809090e..6b5eda0a3 100644 --- a/embassy-rp/src/flash.rs +++ b/embassy-rp/src/flash.rs @@ -627,7 +627,7 @@ mod ram_helpers { /// Length of data must be a multiple of 4096 /// addr must be aligned to 4096 #[inline(never)] - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[cfg(feature = "rp2040")] unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { #[cfg(target_arch = "arm")] @@ -692,7 +692,7 @@ mod ram_helpers { /// Length of data must be a multiple of 4096 /// addr must be aligned to 4096 #[inline(never)] - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[cfg(feature = "_rp235x")] unsafe fn write_flash_inner(addr: u32, len: u32, data: Option<&[u8]>, ptrs: *const FlashFunctionPointers) { let data = data.map(|d| d.as_ptr()).unwrap_or(core::ptr::null()); @@ -811,7 +811,7 @@ mod ram_helpers { /// /// Credit: taken from `rp2040-flash` (also licensed Apache+MIT) #[inline(never)] - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[cfg(feature = "rp2040")] unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) { #[cfg(target_arch = "arm")] diff --git a/embassy-rp/src/intrinsics.rs b/embassy-rp/src/intrinsics.rs index 69d5d92de..aed8a3227 100644 --- a/embassy-rp/src/intrinsics.rs +++ b/embassy-rp/src/intrinsics.rs @@ -223,7 +223,7 @@ macro_rules! intrinsics { #[cfg(all(target_arch = "arm", feature = "intrinsics"))] mod $name { - #[no_mangle] + #[unsafe(no_mangle)] $(#[$($attr)*])* pub extern $abi fn $name( $($argname: $ty),* ) -> $ret { super::$name($($argname),*) @@ -257,7 +257,7 @@ macro_rules! intrinsics { #[cfg(all(target_arch = "arm", feature = "intrinsics"))] mod $name { - #[no_mangle] + #[unsafe(no_mangle)] $(#[$($attr)*])* pub unsafe extern $abi fn $name( $($argname: $ty),* ) -> $ret { super::$name($($argname),*) @@ -392,7 +392,7 @@ macro_rules! division_function { ); #[cfg(target_arch = "arm")] - extern "aapcs" { + unsafe extern "aapcs" { // Connect a local name to global symbol above through FFI. #[link_name = concat!("_erphal_", stringify!($name)) ] fn $name(n: $argty, d: $argty) -> u64; diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index d03ba1fef..4cb1a0912 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -1,5 +1,7 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] +#![allow(unused_unsafe)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] @@ -190,7 +192,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] $(#[cfg($cond_irq)])? unsafe extern "C" fn $irq() { unsafe { @@ -446,13 +448,13 @@ macro_rules! select_bootloader { ( $( $feature:literal => $loader:ident, )+ default => $default:ident ) => { $( #[cfg(feature = $feature)] - #[link_section = ".boot2"] + #[unsafe(link_section = ".boot2")] #[used] static BOOT2: [u8; 256] = rp2040_boot2::$loader; )* #[cfg(not(any( $( feature = $feature),* )))] - #[link_section = ".boot2"] + #[unsafe(link_section = ".boot2")] #[used] static BOOT2: [u8; 256] = rp2040_boot2::$default; } @@ -475,13 +477,13 @@ macro_rules! select_imagedef { ( $( $feature:literal => $imagedef:ident, )+ default => $default:ident ) => { $( #[cfg(feature = $feature)] - #[link_section = ".start_block"] + #[unsafe(link_section = ".start_block")] #[used] static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$imagedef(); )* #[cfg(not(any( $( feature = $feature),* )))] - #[link_section = ".start_block"] + #[unsafe(link_section = ".start_block")] #[used] static IMAGE_DEF: crate::block::ImageDef = crate::block::ImageDef::$default(); } @@ -528,7 +530,7 @@ select_imagedef! { /// } /// ``` pub fn install_core0_stack_guard() -> Result<(), ()> { - extern "C" { + unsafe extern "C" { static mut _stack_end: usize; } unsafe { install_stack_guard(core::ptr::addr_of_mut!(_stack_end)) } diff --git a/embassy-rp/src/multicore.rs b/embassy-rp/src/multicore.rs index adedc98ad..c305513ca 100644 --- a/embassy-rp/src/multicore.rs +++ b/embassy-rp/src/multicore.rs @@ -14,6 +14,7 @@ //! use embassy_rp::multicore::Stack; //! use static_cell::StaticCell; //! use embassy_executor::Executor; +//! use core::ptr::addr_of_mut; //! //! static mut CORE1_STACK: Stack<4096> = Stack::new(); //! static EXECUTOR0: StaticCell = StaticCell::new(); @@ -36,7 +37,7 @@ //! fn main() -> ! { //! let p = embassy_rp::init(Default::default()); //! -//! embassy_rp::multicore::spawn_core1(p.CORE1, unsafe { &mut CORE1_STACK }, move || { +//! embassy_rp::multicore::spawn_core1(p.CORE1, unsafe { &mut *addr_of_mut!(CORE1_STACK) }, move || { //! let executor1 = EXECUTOR1.init(Executor::new()); //! executor1.run(|spawner| spawner.spawn(core1_task().unwrap())); //! }); @@ -110,7 +111,6 @@ impl Stack { #[cfg(all(feature = "rt", feature = "rp2040"))] #[interrupt] -#[link_section = ".data.ram_func"] unsafe fn SIO_IRQ_PROC1() { let sio = pac::SIO; // Clear IRQ @@ -135,7 +135,6 @@ unsafe fn SIO_IRQ_PROC1() { #[cfg(all(feature = "rt", feature = "_rp235x"))] #[interrupt] -#[link_section = ".data.ram_func"] unsafe fn SIO_IRQ_FIFO() { let sio = pac::SIO; // Clear IRQ diff --git a/embassy-rp/src/psram.rs b/embassy-rp/src/psram.rs index ae43dd5aa..22eb1ed25 100644 --- a/embassy-rp/src/psram.rs +++ b/embassy-rp/src/psram.rs @@ -251,7 +251,7 @@ impl<'d> Psram<'d> { } /// Verify APS6404L PSRAM device matches expected configuration. - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[inline(never)] fn verify_aps6404l(qmi: &pac::qmi::Qmi, expected_size: usize) -> Result<(), Error> { // APS6404L-specific constants @@ -306,7 +306,7 @@ impl<'d> Psram<'d> { Ok(()) } - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[inline(never)] unsafe fn read_aps6404l_kgd_eid(qmi: &pac::qmi::Qmi) -> (u32, u32) { const RESET_ENABLE_CMD: u8 = 0xf5; @@ -435,7 +435,7 @@ impl<'d> Psram<'d> { } /// Initialize PSRAM with proper timing. - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[inline(never)] fn init_psram(qmi: &pac::qmi::Qmi, xip_ctrl: &pac::xip_ctrl::XipCtrl, config: &Config) -> Result<(), Error> { // Set PSRAM timing for APS6404 @@ -610,7 +610,7 @@ impl<'d> Psram<'d> { Ok(()) } - #[link_section = ".data.ram_func"] + #[unsafe(link_section = ".data.ram_func")] #[inline(never)] unsafe fn direct_csr_send_init_command(config: &Config, init_cmd: u8) { #[cfg(target_arch = "arm")] diff --git a/embassy-stm32-wpan/Cargo.toml b/embassy-stm32-wpan/Cargo.toml index d7c7a284c..0802b7328 100644 --- a/embassy-stm32-wpan/Cargo.toml +++ b/embassy-stm32-wpan/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-stm32-wpan" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Async STM32 WPAN stack for embedded devices in Rust." keywords = ["embedded", "async", "stm32", "ble", "wpan"] diff --git a/embassy-stm32-wpan/src/lib.rs b/embassy-stm32-wpan/src/lib.rs index 40ff14795..f4eb0069f 100644 --- a/embassy-stm32-wpan/src/lib.rs +++ b/embassy-stm32-wpan/src/lib.rs @@ -13,6 +13,7 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] // #![warn(missing_docs)] #![allow(static_mut_refs)] // TODO: Fix diff --git a/embassy-stm32-wpan/src/tables.rs b/embassy-stm32-wpan/src/tables.rs index fe6fc47a3..204790e6d 100644 --- a/embassy-stm32-wpan/src/tables.rs +++ b/embassy-stm32-wpan/src/tables.rs @@ -190,94 +190,94 @@ pub struct RefTable { } // --------------------- ref table --------------------- -#[link_section = "TL_REF_TABLE"] +#[unsafe(link_section = "TL_REF_TABLE")] pub static mut TL_REF_TABLE: MaybeUninit = MaybeUninit::uninit(); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_DEVICE_INFO_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_BLE_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_THREAD_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_LLD_TESTS_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_BLE_LLD_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_SYS_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_MEM_MANAGER_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_TRACES_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_MAC_802_15_4_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TL_ZIGBEE_TABLE: Aligned> = Aligned(MaybeUninit::uninit()); // --------------------- tables --------------------- -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut FREE_BUF_QUEUE: Aligned> = Aligned(MaybeUninit::uninit()); #[allow(dead_code)] -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut TRACES_EVT_QUEUE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut CS_BUFFER: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut EVT_QUEUE: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut SYSTEM_EVT_QUEUE: Aligned> = Aligned(MaybeUninit::uninit()); // --------------------- app tables --------------------- #[cfg(feature = "mac")] -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut MAC_802_15_4_CMD_BUFFER: Aligned> = Aligned(MaybeUninit::uninit()); #[cfg(feature = "mac")] -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut MAC_802_15_4_NOTIF_RSP_EVT_BUFFER: MaybeUninit< Aligned, > = MaybeUninit::uninit(); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut EVT_POOL: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut SYS_CMD_BUF: Aligned> = Aligned(MaybeUninit::uninit()); -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut SYS_SPARE_EVT_BUF: Aligned> = Aligned(MaybeUninit::uninit()); #[cfg(feature = "mac")] -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut MAC_802_15_4_CNFINDNOT: Aligned> = Aligned(MaybeUninit::uninit()); #[cfg(feature = "ble")] -#[link_section = "MB_MEM1"] +#[unsafe(link_section = "MB_MEM1")] pub static mut BLE_CMD_BUFFER: Aligned> = Aligned(MaybeUninit::uninit()); #[cfg(feature = "ble")] -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] pub static mut BLE_SPARE_EVT_BUF: Aligned> = Aligned(MaybeUninit::uninit()); #[cfg(feature = "ble")] -#[link_section = "MB_MEM2"] +#[unsafe(link_section = "MB_MEM2")] // fuck these "magic" numbers from ST ---v---v pub static mut HCI_ACL_DATA_BUFFER: Aligned> = Aligned(MaybeUninit::uninit()); diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 82bc73708..7c243b350 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-stm32" version = "0.4.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Embassy Hardware Abstraction Layer (HAL) for ST STM32 series microcontrollers" keywords = ["embedded", "async", "stm32", "hal", "embedded-hal"] diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 7e0f7884e..dbf0fe620 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(not(test), no_std)] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![cfg_attr( docsrs, doc = "

You might want to browse the `embassy-stm32` documentation on the Embassy website instead.

The documentation here on `docs.rs` is built for a single chip only (stm32h7, stm32h7rs55 in particular), while on the Embassy website you can pick your exact chip from the top menu. Available peripherals and their APIs change depending on the chip.

\n\n" @@ -194,7 +195,7 @@ macro_rules! bind_interrupts { $( #[allow(non_snake_case)] - #[no_mangle] + #[unsafe(no_mangle)] $(#[cfg($cond_irq)])? $(#[doc = $doc])* unsafe extern "C" fn $irq() { @@ -222,7 +223,7 @@ macro_rules! bind_interrupts { } // Reexports -pub use _generated::{peripherals, Peripherals}; +pub use _generated::{Peripherals, peripherals}; pub use embassy_hal_internal::{Peri, PeripheralType}; #[cfg(feature = "unstable-pac")] pub use stm32_metapac as pac; diff --git a/embassy-sync/Cargo.toml b/embassy-sync/Cargo.toml index 64d76baba..0c28cec7d 100644 --- a/embassy-sync/Cargo.toml +++ b/embassy-sync/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-sync" version = "0.7.2" -edition = "2021" +edition = "2024" description = "no-std, no-alloc synchronization primitives with async support" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-sync" diff --git a/embassy-sync/src/lib.rs b/embassy-sync/src/lib.rs index 5d91b4d9c..1cfde8b10 100644 --- a/embassy-sync/src/lib.rs +++ b/embassy-sync/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![allow(async_fn_in_trait)] #![allow(clippy::new_without_default)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/embassy-time-driver/Cargo.toml b/embassy-time-driver/Cargo.toml index 56ef3d15f..a52e82433 100644 --- a/embassy-time-driver/Cargo.toml +++ b/embassy-time-driver/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-time-driver" version = "0.2.1" -edition = "2021" +edition = "2024" description = "Driver trait for embassy-time" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-time-driver" diff --git a/embassy-time-driver/src/lib.rs b/embassy-time-driver/src/lib.rs index 44d9a156a..f3e8e0153 100644 --- a/embassy-time-driver/src/lib.rs +++ b/embassy-time-driver/src/lib.rs @@ -89,7 +89,7 @@ //! Instead of the usual "trait + generic params" approach, calls from embassy to the driver are done via `extern` functions. //! //! `embassy` internally defines the driver function as `extern "Rust" { fn _embassy_time_now() -> u64; }` and calls it. -//! The driver crate defines the function as `#[no_mangle] fn _embassy_time_now() -> u64`. The linker will resolve the +//! The driver crate defines the function as `#[unsafe(no_mangle)] fn _embassy_time_now() -> u64`. The linker will resolve the //! calls from the `embassy` crate to call into the driver crate. //! //! If there is none or multiple drivers in the crate tree, linking will fail. @@ -133,7 +133,7 @@ pub trait Driver: Send + Sync + 'static { fn schedule_wake(&self, at: u64, waker: &Waker); } -extern "Rust" { +unsafe extern "Rust" { fn _embassy_time_now() -> u64; fn _embassy_time_schedule_wake(at: u64, waker: &Waker); } @@ -158,13 +158,13 @@ macro_rules! time_driver_impl { (static $name:ident: $t: ty = $val:expr) => { static $name: $t = $val; - #[no_mangle] + #[unsafe(no_mangle)] #[inline] fn _embassy_time_now() -> u64 { <$t as $crate::Driver>::now(&$name) } - #[no_mangle] + #[unsafe(no_mangle)] #[inline] fn _embassy_time_schedule_wake(at: u64, waker: &core::task::Waker) { <$t as $crate::Driver>::schedule_wake(&$name, at, waker); diff --git a/embassy-time-queue-utils/Cargo.toml b/embassy-time-queue-utils/Cargo.toml index 13da62874..8da30c544 100644 --- a/embassy-time-queue-utils/Cargo.toml +++ b/embassy-time-queue-utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-time-queue-utils" version = "0.3.0" -edition = "2021" +edition = "2024" description = "Timer queue driver trait for embassy-time" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-time-queue-utils" diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index bad6ecf97..05614dbf5 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-time" version = "0.5.0" -edition = "2021" +edition = "2024" description = "Instant and Duration for embedded no-std systems, with async timer support" repository = "https://github.com/embassy-rs/embassy" documentation = "https://docs.embassy.dev/embassy-time" diff --git a/embassy-time/src/lib.rs b/embassy-time/src/lib.rs index 77f4b344d..5a511a0bd 100644 --- a/embassy-time/src/lib.rs +++ b/embassy-time/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(not(any(feature = "std", feature = "wasm", test)), no_std)] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![allow(clippy::new_without_default)] #![warn(missing_docs)] diff --git a/embassy-usb-dfu/Cargo.toml b/embassy-usb-dfu/Cargo.toml index e70ab970e..8b32582c0 100644 --- a/embassy-usb-dfu/Cargo.toml +++ b/embassy-usb-dfu/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-usb-dfu" version = "0.2.0" description = "An implementation of the USB DFU 1.1 protocol, using embassy-boot" diff --git a/embassy-usb-driver/Cargo.toml b/embassy-usb-driver/Cargo.toml index 6e4c31273..3f43f60a3 100644 --- a/embassy-usb-driver/Cargo.toml +++ b/embassy-usb-driver/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-usb-driver" version = "0.2.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Driver trait for `embassy-usb`, an async USB device stack for embedded devices." keywords = ["embedded", "async", "usb", "hal", "embedded-hal"] diff --git a/embassy-usb-driver/src/lib.rs b/embassy-usb-driver/src/lib.rs index 59845a268..f19e0a401 100644 --- a/embassy-usb-driver/src/lib.rs +++ b/embassy-usb-driver/src/lib.rs @@ -1,5 +1,6 @@ #![no_std] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/embassy-usb-logger/Cargo.toml b/embassy-usb-logger/Cargo.toml index 6d13653bf..683821759 100644 --- a/embassy-usb-logger/Cargo.toml +++ b/embassy-usb-logger/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-usb-logger" version = "0.5.1" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "`log` implementation for USB serial using `embassy-usb`." keywords = ["embedded", "log", "usb", "hal", "serial"] diff --git a/embassy-usb-synopsys-otg/Cargo.toml b/embassy-usb-synopsys-otg/Cargo.toml index 61b14a215..eca68095d 100644 --- a/embassy-usb-synopsys-otg/Cargo.toml +++ b/embassy-usb-synopsys-otg/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-usb-synopsys-otg" version = "0.3.1" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "`embassy-usb-driver` implementation for Synopsys OTG USB controllers" keywords = ["embedded", "async", "usb", "hal", "embedded-hal"] diff --git a/embassy-usb-synopsys-otg/src/lib.rs b/embassy-usb-synopsys-otg/src/lib.rs index 6b4a87bdf..b8750491d 100644 --- a/embassy-usb-synopsys-otg/src/lib.rs +++ b/embassy-usb-synopsys-otg/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(not(test), no_std)] #![allow(async_fn_in_trait)] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml index bff48c4a6..aeb7392f1 100644 --- a/embassy-usb/Cargo.toml +++ b/embassy-usb/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-usb" version = "0.5.1" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "Async USB device stack for embedded devices in Rust." keywords = ["embedded", "async", "usb", "hal", "embedded-hal"] diff --git a/embassy-usb/src/lib.rs b/embassy-usb/src/lib.rs index 0638fd0a2..7f78de29d 100644 --- a/embassy-usb/src/lib.rs +++ b/embassy-usb/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(unsafe_op_in_unsafe_fn)] #![doc = include_str!("../README.md")] #![warn(missing_docs)] diff --git a/examples/boot/application/nrf/Cargo.toml b/examples/boot/application/nrf/Cargo.toml index f5f89ecb5..55053bc33 100644 --- a/examples/boot/application/nrf/Cargo.toml +++ b/examples/boot/application/nrf/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-nrf-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/rp/Cargo.toml b/examples/boot/application/rp/Cargo.toml index d86386b00..70a2c28c3 100644 --- a/examples/boot/application/rp/Cargo.toml +++ b/examples/boot/application/rp/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-rp-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml index cd5f422fc..2dc75d939 100644 --- a/examples/boot/application/stm32f3/Cargo.toml +++ b/examples/boot/application/stm32f3/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32f3-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml index c3921a166..5c372fb19 100644 --- a/examples/boot/application/stm32f7/Cargo.toml +++ b/examples/boot/application/stm32f7/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32f7-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml index ca186d4d9..641a2ba96 100644 --- a/examples/boot/application/stm32h7/Cargo.toml +++ b/examples/boot/application/stm32h7/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32h7-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml index be08956f1..4a168be15 100644 --- a/examples/boot/application/stm32l0/Cargo.toml +++ b/examples/boot/application/stm32l0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32l0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml index 207eed733..af2cb3881 100644 --- a/examples/boot/application/stm32l1/Cargo.toml +++ b/examples/boot/application/stm32l1/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32l1-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml index 22b9642d8..032e934aa 100644 --- a/examples/boot/application/stm32l4/Cargo.toml +++ b/examples/boot/application/stm32l4/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32l4-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32wb-dfu/Cargo.toml b/examples/boot/application/stm32wb-dfu/Cargo.toml index e2be4f470..ea4c26681 100644 --- a/examples/boot/application/stm32wb-dfu/Cargo.toml +++ b/examples/boot/application/stm32wb-dfu/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32wb-dfu-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32wba-dfu/Cargo.toml b/examples/boot/application/stm32wba-dfu/Cargo.toml index 6f4213b2c..d6f7dc3b6 100644 --- a/examples/boot/application/stm32wba-dfu/Cargo.toml +++ b/examples/boot/application/stm32wba-dfu/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32wba-dfu-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml index 8d1446ba9..c7fa811c9 100644 --- a/examples/boot/application/stm32wl/Cargo.toml +++ b/examples/boot/application/stm32wl/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-boot-stm32wl-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/boot/bootloader/nrf/Cargo.toml b/examples/boot/bootloader/nrf/Cargo.toml index 72b7114d4..1fea2b7d7 100644 --- a/examples/boot/bootloader/nrf/Cargo.toml +++ b/examples/boot/bootloader/nrf/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "nrf-bootloader-example" version = "0.1.0" description = "Bootloader for nRF chips" diff --git a/examples/boot/bootloader/nrf/src/main.rs b/examples/boot/bootloader/nrf/src/main.rs index b849a0df3..76c4c1048 100644 --- a/examples/boot/bootloader/nrf/src/main.rs +++ b/examples/boot/bootloader/nrf/src/main.rs @@ -38,8 +38,8 @@ fn main() -> ! { unsafe { bl.load(active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -47,7 +47,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/boot/bootloader/rp/Cargo.toml b/examples/boot/bootloader/rp/Cargo.toml index 93a1c4edf..188bcab36 100644 --- a/examples/boot/bootloader/rp/Cargo.toml +++ b/examples/boot/bootloader/rp/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "rp-bootloader-example" version = "0.1.0" description = "Example bootloader for RP2040 chips" diff --git a/examples/boot/bootloader/rp/src/main.rs b/examples/boot/bootloader/rp/src/main.rs index 25b1657b8..7ebefd374 100644 --- a/examples/boot/bootloader/rp/src/main.rs +++ b/examples/boot/bootloader/rp/src/main.rs @@ -34,8 +34,8 @@ fn main() -> ! { unsafe { bl.load(embassy_rp::flash::FLASH_BASE as u32 + active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -43,7 +43,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/boot/bootloader/stm32-dual-bank/Cargo.toml b/examples/boot/bootloader/stm32-dual-bank/Cargo.toml index 95ca20a59..cf68921dc 100644 --- a/examples/boot/bootloader/stm32-dual-bank/Cargo.toml +++ b/examples/boot/bootloader/stm32-dual-bank/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "stm32-bootloader-dual-bank-flash-example" version = "0.1.0" description = "Example bootloader for dual-bank flash STM32 chips" diff --git a/examples/boot/bootloader/stm32-dual-bank/src/main.rs b/examples/boot/bootloader/stm32-dual-bank/src/main.rs index 4d2e82d26..ea81e1fe5 100644 --- a/examples/boot/bootloader/stm32-dual-bank/src/main.rs +++ b/examples/boot/bootloader/stm32-dual-bank/src/main.rs @@ -33,8 +33,8 @@ fn main() -> ! { unsafe { bl.load(BANK1_REGION.base + active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -42,7 +42,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/boot/bootloader/stm32/Cargo.toml b/examples/boot/bootloader/stm32/Cargo.toml index 526637f37..e457310b9 100644 --- a/examples/boot/bootloader/stm32/Cargo.toml +++ b/examples/boot/bootloader/stm32/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "stm32-bootloader-example" version = "0.1.0" description = "Example bootloader for STM32 chips" diff --git a/examples/boot/bootloader/stm32/src/main.rs b/examples/boot/bootloader/stm32/src/main.rs index 99a7a6a6b..f74edd75f 100644 --- a/examples/boot/bootloader/stm32/src/main.rs +++ b/examples/boot/bootloader/stm32/src/main.rs @@ -32,8 +32,8 @@ fn main() -> ! { unsafe { bl.load(BANK1_REGION.base + active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -41,7 +41,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/boot/bootloader/stm32wb-dfu/Cargo.toml b/examples/boot/bootloader/stm32wb-dfu/Cargo.toml index ef10aeabf..75b7081df 100644 --- a/examples/boot/bootloader/stm32wb-dfu/Cargo.toml +++ b/examples/boot/bootloader/stm32wb-dfu/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "stm32wb-dfu-bootloader-example" version = "0.1.0" description = "Example USB DFUbootloader for the STM32WB series of chips" diff --git a/examples/boot/bootloader/stm32wb-dfu/src/main.rs b/examples/boot/bootloader/stm32wb-dfu/src/main.rs index 107f243fd..475f1234d 100644 --- a/examples/boot/bootloader/stm32wb-dfu/src/main.rs +++ b/examples/boot/bootloader/stm32wb-dfu/src/main.rs @@ -109,8 +109,8 @@ fn main() -> ! { unsafe { bl.load(BANK1_REGION.base + active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -118,7 +118,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/boot/bootloader/stm32wba-dfu/Cargo.toml b/examples/boot/bootloader/stm32wba-dfu/Cargo.toml index 16de7684e..eee2b2f71 100644 --- a/examples/boot/bootloader/stm32wba-dfu/Cargo.toml +++ b/examples/boot/bootloader/stm32wba-dfu/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "stm32wba6-dfu-bootloader-example" version = "0.1.0" description = "Example USB DFUbootloader for the STM32WBA series of chips" diff --git a/examples/boot/bootloader/stm32wba-dfu/src/main.rs b/examples/boot/bootloader/stm32wba-dfu/src/main.rs index 75d8d4199..e4aacbca9 100644 --- a/examples/boot/bootloader/stm32wba-dfu/src/main.rs +++ b/examples/boot/bootloader/stm32wba-dfu/src/main.rs @@ -138,8 +138,8 @@ fn main() -> ! { unsafe { bl.load(BANK1_REGION.base + active_offset) } } -#[no_mangle] -#[cfg_attr(target_os = "none", link_section = ".HardFault.user")] +#[unsafe(no_mangle)] +#[cfg_attr(target_os = "none", unsafe(link_section = ".HardFault.user"))] unsafe extern "C" fn HardFault() { cortex_m::peripheral::SCB::sys_reset(); } @@ -147,7 +147,7 @@ unsafe extern "C" fn HardFault() { #[exception] unsafe fn DefaultHandler(_: i16) -> ! { const SCB_ICSR: *const u32 = 0xE000_ED04 as *const u32; - let irqn = core::ptr::read_volatile(SCB_ICSR) as u8 as i16 - 16; + let irqn = unsafe { core::ptr::read_volatile(SCB_ICSR) } as u8 as i16 - 16; panic!("DefaultHandler #{:?}", irqn); } diff --git a/examples/lpc55s69/Cargo.toml b/examples/lpc55s69/Cargo.toml index 579748595..94903b3f8 100644 --- a/examples/lpc55s69/Cargo.toml +++ b/examples/lpc55s69/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nxp-lpc55s69-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/mimxrt1011/Cargo.toml b/examples/mimxrt1011/Cargo.toml index 3038f5d4d..d784ce729 100644 --- a/examples/mimxrt1011/Cargo.toml +++ b/examples/mimxrt1011/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-imxrt1011-examples" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/examples/mimxrt1011/src/lib.rs b/examples/mimxrt1011/src/lib.rs index f0391ef57..36d3e2fb3 100644 --- a/examples/mimxrt1011/src/lib.rs +++ b/examples/mimxrt1011/src/lib.rs @@ -71,5 +71,5 @@ pub const SERIAL_NOR_CONFIGURATION_BLOCK: nor::ConfigurationBlock = .ip_cmd_serial_clk_freq(nor::SerialClockFrequency::MHz30); #[unsafe(no_mangle)] -#[cfg_attr(all(target_arch = "arm", target_os = "none"), link_section = ".fcb")] +#[cfg_attr(all(target_arch = "arm", target_os = "none"), unsafe(link_section = ".fcb"))] pub static FLEXSPI_CONFIGURATION_BLOCK: nor::ConfigurationBlock = SERIAL_NOR_CONFIGURATION_BLOCK; diff --git a/examples/mimxrt1062-evk/Cargo.toml b/examples/mimxrt1062-evk/Cargo.toml index 82a24490d..29a80db12 100644 --- a/examples/mimxrt1062-evk/Cargo.toml +++ b/examples/mimxrt1062-evk/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-imxrt1062-evk-examples" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/examples/mimxrt1062-evk/src/lib.rs b/examples/mimxrt1062-evk/src/lib.rs index 3f99f9db3..e952b91ec 100644 --- a/examples/mimxrt1062-evk/src/lib.rs +++ b/examples/mimxrt1062-evk/src/lib.rs @@ -55,6 +55,6 @@ pub const SERIAL_NOR_CONFIGURATION_BLOCK: nor::ConfigurationBlock = .sector_size(4096) .ip_cmd_serial_clk_freq(nor::SerialClockFrequency::MHz30); -#[no_mangle] -#[cfg_attr(all(target_arch = "arm", target_os = "none"), link_section = ".fcb")] +#[unsafe(no_mangle)] +#[cfg_attr(all(target_arch = "arm", target_os = "none"), unsafe(link_section = ".fcb"))] pub static FLEXSPI_CONFIGURATION_BLOCK: nor::ConfigurationBlock = SERIAL_NOR_CONFIGURATION_BLOCK; diff --git a/examples/mimxrt6/Cargo.toml b/examples/mimxrt6/Cargo.toml index 3f7ad8485..dc09e97e7 100644 --- a/examples/mimxrt6/Cargo.toml +++ b/examples/mimxrt6/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-imxrt-examples" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/examples/mspm0c1104/Cargo.toml b/examples/mspm0c1104/Cargo.toml index 21434106a..74301bc9c 100644 --- a/examples/mspm0c1104/Cargo.toml +++ b/examples/mspm0c1104/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-c1104-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/mspm0g3507/Cargo.toml b/examples/mspm0g3507/Cargo.toml index 616b82adb..8c230f038 100644 --- a/examples/mspm0g3507/Cargo.toml +++ b/examples/mspm0g3507/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-g3507-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/mspm0g3519/Cargo.toml b/examples/mspm0g3519/Cargo.toml index ae699d6f4..0f5e58343 100644 --- a/examples/mspm0g3519/Cargo.toml +++ b/examples/mspm0g3519/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-g3519-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/mspm0l1306/Cargo.toml b/examples/mspm0l1306/Cargo.toml index 8100e11da..d5b5e9d3e 100644 --- a/examples/mspm0l1306/Cargo.toml +++ b/examples/mspm0l1306/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-l1306-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/mspm0l2228/Cargo.toml b/examples/mspm0l2228/Cargo.toml index 3add7b8e8..1d27ae64a 100644 --- a/examples/mspm0l2228/Cargo.toml +++ b/examples/mspm0l2228/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-l2228-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf-rtos-trace/Cargo.toml b/examples/nrf-rtos-trace/Cargo.toml index d2d0ae093..5caabf228 100644 --- a/examples/nrf-rtos-trace/Cargo.toml +++ b/examples/nrf-rtos-trace/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf-rtos-trace-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf51/Cargo.toml b/examples/nrf51/Cargo.toml index 082d85e5b..c7492f562 100644 --- a/examples/nrf51/Cargo.toml +++ b/examples/nrf51/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf51-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf52810/Cargo.toml b/examples/nrf52810/Cargo.toml index 7835320e5..1711a3d8d 100644 --- a/examples/nrf52810/Cargo.toml +++ b/examples/nrf52810/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf52810-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf52840-edf/Cargo.toml b/examples/nrf52840-edf/Cargo.toml index 67a624d6d..8b1db4652 100644 --- a/examples/nrf52840-edf/Cargo.toml +++ b/examples/nrf52840-edf/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf52840-edf-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf52840-rtic/Cargo.toml b/examples/nrf52840-rtic/Cargo.toml index d860626a1..26b21598f 100644 --- a/examples/nrf52840-rtic/Cargo.toml +++ b/examples/nrf52840-rtic/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf52840-rtic-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml index 5b3e176c0..a026d6352 100644 --- a/examples/nrf52840/Cargo.toml +++ b/examples/nrf52840/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf52840-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf52840/src/bin/multiprio.rs b/examples/nrf52840/src/bin/multiprio.rs index 4d9b986d4..dc566adee 100644 --- a/examples/nrf52840/src/bin/multiprio.rs +++ b/examples/nrf52840/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn EGU1_SWI1() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn EGU0_SWI0() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/nrf52840/src/bin/raw_spawn.rs b/examples/nrf52840/src/bin/raw_spawn.rs index b80954408..faa8517c8 100644 --- a/examples/nrf52840/src/bin/raw_spawn.rs +++ b/examples/nrf52840/src/bin/raw_spawn.rs @@ -48,5 +48,5 @@ fn main() -> ! { } unsafe fn make_static(t: &T) -> &'static T { - mem::transmute(t) + unsafe { mem::transmute(t) } } diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml index 256fee08d..4dcbdd715 100644 --- a/examples/nrf5340/Cargo.toml +++ b/examples/nrf5340/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf5340-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf54l15/Cargo.toml b/examples/nrf54l15/Cargo.toml index 9c24cdab4..a053dd0ec 100644 --- a/examples/nrf54l15/Cargo.toml +++ b/examples/nrf54l15/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf54l15-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf9151/ns/Cargo.toml b/examples/nrf9151/ns/Cargo.toml index 89a6c7c94..7f1f5239a 100644 --- a/examples/nrf9151/ns/Cargo.toml +++ b/examples/nrf9151/ns/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf9151-non-secure-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf9151/s/Cargo.toml b/examples/nrf9151/s/Cargo.toml index 870311c5d..ce71cc456 100644 --- a/examples/nrf9151/s/Cargo.toml +++ b/examples/nrf9151/s/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf9151-secure-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf9160/Cargo.toml b/examples/nrf9160/Cargo.toml index 274e26dd6..ae3b2eeb1 100644 --- a/examples/nrf9160/Cargo.toml +++ b/examples/nrf9160/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf9160-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/nrf9160/src/bin/modem_tcp_client.rs b/examples/nrf9160/src/bin/modem_tcp_client.rs index 460a4cfae..c9d879662 100644 --- a/examples/nrf9160/src/bin/modem_tcp_client.rs +++ b/examples/nrf9160/src/bin/modem_tcp_client.rs @@ -101,7 +101,7 @@ async fn blink_task(pin: Peri<'static, AnyPin>) { } } -extern "C" { +unsafe extern "C" { static __start_ipc: u8; static __end_ipc: u8; } diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 97e019cdf..640addb28 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-rp-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/rp/src/bin/multiprio.rs b/examples/rp/src/bin/multiprio.rs index 96cdf8fb1..0750d9bb7 100644 --- a/examples/rp/src/bin/multiprio.rs +++ b/examples/rp/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn SWI_IRQ_1() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn SWI_IRQ_0() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/rp/src/bin/sharing.rs b/examples/rp/src/bin/sharing.rs index d4c89946b..618ab9117 100644 --- a/examples/rp/src/bin/sharing.rs +++ b/examples/rp/src/bin/sharing.rs @@ -52,7 +52,7 @@ bind_interrupts!(struct Irqs { #[interrupt] unsafe fn SWI_IRQ_0() { - EXECUTOR_HI.on_interrupt() + unsafe { EXECUTOR_HI.on_interrupt() } } #[entry] diff --git a/examples/rp235x/Cargo.toml b/examples/rp235x/Cargo.toml index 40fbb5798..39a4f421a 100644 --- a/examples/rp235x/Cargo.toml +++ b/examples/rp235x/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-rp2350-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/rp235x/src/bin/multiprio.rs b/examples/rp235x/src/bin/multiprio.rs index 96cdf8fb1..0750d9bb7 100644 --- a/examples/rp235x/src/bin/multiprio.rs +++ b/examples/rp235x/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn SWI_IRQ_1() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn SWI_IRQ_0() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/rp235x/src/bin/sharing.rs b/examples/rp235x/src/bin/sharing.rs index d4c89946b..618ab9117 100644 --- a/examples/rp235x/src/bin/sharing.rs +++ b/examples/rp235x/src/bin/sharing.rs @@ -52,7 +52,7 @@ bind_interrupts!(struct Irqs { #[interrupt] unsafe fn SWI_IRQ_0() { - EXECUTOR_HI.on_interrupt() + unsafe { EXECUTOR_HI.on_interrupt() } } #[entry] diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 449c5ddca..6dc6a353d 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-std-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32c0/Cargo.toml b/examples/stm32c0/Cargo.toml index bb7b57496..696a95854 100644 --- a/examples/stm32c0/Cargo.toml +++ b/examples/stm32c0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32c0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index 11ecbe3c2..a78873d21 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "embassy-stm32f0-examples" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs index b5244afc8..9a8dc5685 100644 --- a/examples/stm32f0/src/bin/multiprio.rs +++ b/examples/stm32f0/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn USART1() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn USART2() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index dcb58796b..5714b149a 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f1-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml index 498c20d84..f726018c3 100644 --- a/examples/stm32f2/Cargo.toml +++ b/examples/stm32f2/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f2-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml index 23025ef0b..4349e8055 100644 --- a/examples/stm32f3/Cargo.toml +++ b/examples/stm32f3/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f3-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f3/src/bin/multiprio.rs b/examples/stm32f3/src/bin/multiprio.rs index 2f2ffdea2..8375e0e8e 100644 --- a/examples/stm32f3/src/bin/multiprio.rs +++ b/examples/stm32f3/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn UART4() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn UART5() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/stm32f334/Cargo.toml b/examples/stm32f334/Cargo.toml index 3495b118c..cf22633dd 100644 --- a/examples/stm32f334/Cargo.toml +++ b/examples/stm32f334/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f334-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index fb5f86aac..d06b7505c 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f4-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f4/src/bin/multiprio.rs b/examples/stm32f4/src/bin/multiprio.rs index 2f2ffdea2..8375e0e8e 100644 --- a/examples/stm32f4/src/bin/multiprio.rs +++ b/examples/stm32f4/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn UART4() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn UART5() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/stm32f469/Cargo.toml b/examples/stm32f469/Cargo.toml index f1d0e411a..5216e19b4 100644 --- a/examples/stm32f469/Cargo.toml +++ b/examples/stm32f469/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f469-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 5d7763334..565277394 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32f7-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 1c9451469..16f28500d 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32g0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml index 102960980..6fd282d6d 100644 --- a/examples/stm32g4/Cargo.toml +++ b/examples/stm32g4/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32g4-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index 66680c027..475ba7e8a 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h5-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 9a2080013..5993110de 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h7-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h7/src/bin/multiprio.rs b/examples/stm32h7/src/bin/multiprio.rs index 2f2ffdea2..8375e0e8e 100644 --- a/examples/stm32h7/src/bin/multiprio.rs +++ b/examples/stm32h7/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn UART4() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn UART5() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/stm32h723/Cargo.toml b/examples/stm32h723/Cargo.toml index 7e4ccc528..93a5109e2 100644 --- a/examples/stm32h723/Cargo.toml +++ b/examples/stm32h723/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h723-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h735/Cargo.toml b/examples/stm32h735/Cargo.toml index 22b7ad96a..1ad2eeb2e 100644 --- a/examples/stm32h735/Cargo.toml +++ b/examples/stm32h735/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h735-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h742/Cargo.toml b/examples/stm32h742/Cargo.toml index c76340b5f..9b5e5d93d 100644 --- a/examples/stm32h742/Cargo.toml +++ b/examples/stm32h742/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h742-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h755cm4/Cargo.toml b/examples/stm32h755cm4/Cargo.toml index c73f9df79..b5c313523 100644 --- a/examples/stm32h755cm4/Cargo.toml +++ b/examples/stm32h755cm4/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h755cm4-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h755cm4/src/bin/intercore.rs b/examples/stm32h755cm4/src/bin/intercore.rs index f584e31e9..d93d31786 100644 --- a/examples/stm32h755cm4/src/bin/intercore.rs +++ b/examples/stm32h755cm4/src/bin/intercore.rs @@ -85,7 +85,7 @@ mod shared { } } - #[link_section = ".ram_d3"] + #[unsafe(link_section = ".ram_d3")] pub static SHARED_LED_STATE: SharedLedState = SharedLedState::new(); } @@ -99,7 +99,7 @@ use embassy_time::Timer; use shared::SHARED_LED_STATE; use {defmt_rtt as _, panic_probe as _}; -#[link_section = ".ram_d3"] +#[unsafe(link_section = ".ram_d3")] static SHARED_DATA: MaybeUninit = MaybeUninit::uninit(); /// Task that continuously blinks the red LED as a heartbeat indicator diff --git a/examples/stm32h755cm7/Cargo.toml b/examples/stm32h755cm7/Cargo.toml index c34d4e45c..7a1519aae 100644 --- a/examples/stm32h755cm7/Cargo.toml +++ b/examples/stm32h755cm7/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h755cm7-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h755cm7/src/bin/intercore.rs b/examples/stm32h755cm7/src/bin/intercore.rs index a4e1b5ff4..3df0b26d7 100644 --- a/examples/stm32h755cm7/src/bin/intercore.rs +++ b/examples/stm32h755cm7/src/bin/intercore.rs @@ -97,7 +97,7 @@ mod shared { } } - #[link_section = ".ram_d3"] + #[unsafe(link_section = ".ram_d3")] pub static SHARED_LED_STATE: SharedLedState = SharedLedState::new(); // Memory region constants for MPU configuration @@ -106,7 +106,7 @@ mod shared { pub const SRAM4_REGION_NUMBER: u8 = 0; } -#[link_section = ".ram_d3"] +#[unsafe(link_section = ".ram_d3")] static SHARED_DATA: MaybeUninit = MaybeUninit::uninit(); /// Configure MPU to make SRAM4 region non-cacheable diff --git a/examples/stm32h7b0/Cargo.toml b/examples/stm32h7b0/Cargo.toml index 1917749c5..4cd7b84e5 100644 --- a/examples/stm32h7b0/Cargo.toml +++ b/examples/stm32h7b0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h7b0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h7rs/Cargo.toml b/examples/stm32h7rs/Cargo.toml index bfe59b68d..445916972 100644 --- a/examples/stm32h7rs/Cargo.toml +++ b/examples/stm32h7rs/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32h7rs-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32h7rs/src/bin/multiprio.rs b/examples/stm32h7rs/src/bin/multiprio.rs index 2f2ffdea2..8375e0e8e 100644 --- a/examples/stm32h7rs/src/bin/multiprio.rs +++ b/examples/stm32h7rs/src/bin/multiprio.rs @@ -113,12 +113,12 @@ static EXECUTOR_LOW: StaticCell = StaticCell::new(); #[interrupt] unsafe fn UART4() { - EXECUTOR_HIGH.on_interrupt() + unsafe { EXECUTOR_HIGH.on_interrupt() } } #[interrupt] unsafe fn UART5() { - EXECUTOR_MED.on_interrupt() + unsafe { EXECUTOR_MED.on_interrupt() } } #[entry] diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index d42cdac15..a9c71d655 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32l0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32l0/src/bin/raw_spawn.rs b/examples/stm32l0/src/bin/raw_spawn.rs index 6385e3c8f..7eea910ca 100644 --- a/examples/stm32l0/src/bin/raw_spawn.rs +++ b/examples/stm32l0/src/bin/raw_spawn.rs @@ -48,5 +48,5 @@ fn main() -> ! { } unsafe fn make_static(t: &T) -> &'static T { - mem::transmute(t) + unsafe { mem::transmute(t) } } diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index 76ceade9c..7f6b31ed5 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32l1-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 1b7f15b1d..936472199 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32l4-examples" version = "0.1.1" license = "MIT OR Apache-2.0" diff --git a/examples/stm32l432/Cargo.toml b/examples/stm32l432/Cargo.toml index f173c651e..14f41992d 100644 --- a/examples/stm32l432/Cargo.toml +++ b/examples/stm32l432/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32l432-examples" version = "0.1.1" license = "MIT OR Apache-2.0" diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 9999300b8..b6158c854 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32l5-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32u0/Cargo.toml b/examples/stm32u0/Cargo.toml index 9318414a5..9f5227e3f 100644 --- a/examples/stm32u0/Cargo.toml +++ b/examples/stm32u0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32u0-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index f2ffe52c5..7a1e62406 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32u5-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index 7ab13c290..783690c11 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32wb-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32wba/Cargo.toml b/examples/stm32wba/Cargo.toml index e1196614a..3496b41b0 100644 --- a/examples/stm32wba/Cargo.toml +++ b/examples/stm32wba/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32wba-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32wba6/Cargo.toml b/examples/stm32wba6/Cargo.toml index f98317846..04bb27cb0 100644 --- a/examples/stm32wba6/Cargo.toml +++ b/examples/stm32wba6/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32wba6-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml index 825d25c0d..1754aa0b8 100644 --- a/examples/stm32wl/Cargo.toml +++ b/examples/stm32wl/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32wl-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index e8897506c..79d50b584 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-wasm-example" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/rustfmt.toml b/rustfmt.toml index 2561562fd..3d5eeed93 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,4 +1,4 @@ group_imports = "StdExternalCrate" imports_granularity = "Module" -edition = "2021" +edition = "2024" max_width = 120 diff --git a/tests/mspm0/Cargo.toml b/tests/mspm0/Cargo.toml index 227d898d5..df52b538d 100644 --- a/tests/mspm0/Cargo.toml +++ b/tests/mspm0/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-mspm0-tests" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml index 8acf27ce7..3a9b86cef 100644 --- a/tests/nrf/Cargo.toml +++ b/tests/nrf/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-nrf-examples" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/tests/perf-client/Cargo.toml b/tests/perf-client/Cargo.toml index c426fdd74..3756046fa 100644 --- a/tests/perf-client/Cargo.toml +++ b/tests/perf-client/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "perf-client" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/tests/perf-server/Cargo.toml b/tests/perf-server/Cargo.toml index f048eade2..72f92ed8d 100644 --- a/tests/perf-server/Cargo.toml +++ b/tests/perf-server/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "perf-server" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false diff --git a/tests/riscv32/Cargo.toml b/tests/riscv32/Cargo.toml index c441e8ed3..935c6a2ee 100644 --- a/tests/riscv32/Cargo.toml +++ b/tests/riscv32/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-riscv-tests" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index 19461520a..640e58f11 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-rp-tests" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index 891ec93fd..1161e827b 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml @@ -1,5 +1,5 @@ [package] -edition = "2021" +edition = "2024" name = "embassy-stm32-tests" version = "0.1.0" license = "MIT OR Apache-2.0" diff --git a/tests/utils/Cargo.toml b/tests/utils/Cargo.toml index ddb990e0f..da04a1f5d 100644 --- a/tests/utils/Cargo.toml +++ b/tests/utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "test-utils" version = "0.1.0" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" publish = false -- cgit