{"id":13472696,"url":"https://github.com/embassy-rs/embassy","last_synced_at":"2025-09-09T20:41:28.536Z","repository":{"id":36994266,"uuid":"297701481","full_name":"embassy-rs/embassy","owner":"embassy-rs","description":"Modern embedded framework, using Rust and async.","archived":false,"fork":false,"pushed_at":"2025-09-04T11:43:31.000Z","size":21983,"stargazers_count":7367,"open_issues_count":557,"forks_count":1160,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-09-04T13:30:53.886Z","etag":null,"topics":["async","drivers","embedded","executor","hal","rust"],"latest_commit_sha":null,"homepage":"https://embassy.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/embassy-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-22T16:04:20.000Z","updated_at":"2025-09-04T13:22:01.000Z","dependencies_parsed_at":"2023-09-25T21:02:13.833Z","dependency_job_id":"d5876df5-d079-4979-8513-ab5298fba98c","html_url":"https://github.com/embassy-rs/embassy","commit_stats":{"total_commits":6789,"total_committers":467,"mean_commits":"14.537473233404711","dds":0.7568124907939313,"last_synced_commit":"27fb1f4dd004bd32c718b932694cb498fe9bff91"},"previous_names":["akiles/embassy"],"tags_count":164,"template":false,"template_full_name":null,"purl":"pkg:github/embassy-rs/embassy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embassy-rs%2Fembassy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embassy-rs%2Fembassy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embassy-rs%2Fembassy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embassy-rs%2Fembassy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/embassy-rs","download_url":"https://codeload.github.com/embassy-rs/embassy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embassy-rs%2Fembassy/sbom","scorecard":{"id":176067,"data":{"date":"2025-08-11","repo":{"name":"github.com/embassy-rs/embassy","commit":"113fece2aa2ce322a4b02302ffa32fcff217f6ea"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 11 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/changelog.yml:1","Warn: no topLevel permission defined: .github/workflows/matrix-bot.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 9/16 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/changelog.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:111: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:118: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:153: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:160: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:167: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:174: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:181: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:188: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:195: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:202: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:209: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:216: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:223: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:230: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:237: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:244: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:251: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:258: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:265: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:272: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:279: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:286: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:293: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:300: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:307: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:314: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:321: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:328: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:335: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:342: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/changelog.yml:349: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/changelog.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/matrix-bot.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/matrix-bot.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/matrix-bot.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/matrix-bot.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/matrix-bot.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/embassy-rs/embassy/matrix-bot.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  40 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T17:42:42.429Z","repository_id":36994266,"created_at":"2025-08-16T17:42:42.429Z","updated_at":"2025-08-16T17:42:42.429Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273709018,"owners_count":25153733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","drivers","embedded","executor","hal","rust"],"created_at":"2024-07-31T16:00:57.165Z","updated_at":"2025-09-09T20:41:28.529Z","avatar_url":"https://github.com/embassy-rs.png","language":"Rust","funding_links":[],"categories":["Rust","硬件_其他","Embedded Development","\u003ca name=\"Rust\"\u003e\u003c/a\u003eRust","Applications"],"sub_categories":["网络服务_其他","Embedded"],"readme":"# Embassy\n\nEmbassy is the next-generation framework for embedded applications. Write safe, correct, and energy-efficient embedded code faster, using the Rust programming language, its async facilities, and the Embassy libraries.\n\n## [Documentation](https://embassy.dev/book/index.html) - [API reference](https://docs.embassy.dev/) - [Website](https://embassy.dev/) - [Chat](https://matrix.to/#/#embassy-rs:matrix.org)\n\n## Rust + async ❤️ embedded\n\nThe Rust programming language is blazingly fast and memory-efficient, with no runtime, garbage collector, or OS. It catches a wide variety of bugs at compile time, thanks to its full memory- and thread-safety, and expressive type system.\n\nRust's [async/await](https://rust-lang.github.io/async-book/) allows for unprecedentedly easy and efficient multitasking in embedded systems. Tasks get transformed at compile time into state machines that get run cooperatively. It requires no dynamic memory allocation and runs on a single stack, so no per-task stack size tuning is required. It obsoletes the need for a traditional RTOS with kernel context switching, and is [faster and smaller than one!](https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown)\n\n## Batteries included\n\n- **Hardware Abstraction Layers**\n    - HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so raw register manipulation is not needed. The Embassy project maintains HALs for select hardware, but you can still use HALs from other projects with Embassy.\n    - [embassy-stm32](https://docs.embassy.dev/embassy-stm32/), for all STM32 microcontroller families.\n    - [embassy-nrf](https://docs.embassy.dev/embassy-nrf/), for the Nordic Semiconductor nRF52, nRF53, nRF54 and nRF91 series.\n    - [embassy-rp](https://docs.embassy.dev/embassy-rp/), for the Raspberry Pi RP2040 and RP23xx microcontrollers.\n    - [embassy-mspm0](https://docs.embassy.dev/embassy-mspm0/), for the Texas Instruments MSPM0 microcontrollers.\n    - [esp-rs](https://github.com/esp-rs), for the Espressif Systems ESP32 series of chips.\n        - Embassy HAL support for Espressif chips, as well as Async Wi-Fi, Bluetooth, and ESP-NOW, is being developed in the [esp-rs/esp-hal](https://github.com/esp-rs/esp-hal) repository.\n    - [ch32-hal](https://github.com/ch32-rs/ch32-hal), for the WCH 32-bit RISC-V(CH32V) series of chips.\n    - [mpfs-hal](https://github.com/AlexCharlton/mpfs-hal), for the Microchip PolarFire SoC.\n    - [py32-hal](https://github.com/py32-rs/py32-hal), for the Puya Semiconductor PY32 series of microcontrollers.\n\n- **Time that Just Works** -\n  No more messing with hardware timers. [embassy_time](https://docs.embassy.dev/embassy-time) provides Instant, Duration, and Timer types that are globally available and never overflow.\n\n- **Real-time ready** -\n  Tasks on the same async executor run cooperatively, but you can create multiple executors with different priorities so that higher priority tasks preempt lower priority ones. See the [example](https://github.com/embassy-rs/embassy/blob/master/examples/nrf52840/src/bin/multiprio.rs).\n\n- **Low-power ready** -\n  Easily build devices with years of battery life. The async executor automatically puts the core to sleep when there's no work to do. Tasks are woken by interrupts, there is no busy-loop polling while waiting.\n\n- **Networking** -\n  The [embassy-net](https://docs.embassy.dev/embassy-net/) network stack implements extensive networking functionality, including Ethernet, IP, TCP, UDP, ICMP, and DHCP. Async drastically simplifies managing timeouts and serving multiple connections concurrently.\n\n- **Bluetooth**\n    - The [trouble](https://github.com/embassy-rs/trouble) crate provides a Bluetooth Low Energy 4.x and 5.x Host that runs on any microcontroller implementing the [bt-hci](https://github.com/embassy-rs/bt-hci) traits (currently\n      `nRF52`, `rp2040`, `rp23xx` and `esp32` and `serial` controllers are supported).\n    - The [nrf-softdevice](https://github.com/embassy-rs/nrf-softdevice) crate provides Bluetooth Low Energy 4.x and 5.x support for nRF52 microcontrollers.\n    - The [embassy-stm32-wpan](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32-wpan) crate provides Bluetooth Low Energy 5.x support for stm32wb microcontrollers.\n\n- **LoRa** -\n  The [lora-rs](https://github.com/lora-rs/lora-rs) project provides an async LoRa and LoRaWAN stack that works well on Embassy.\n\n- **USB** -\n  [embassy-usb](https://docs.embassy.dev/embassy-usb/) implements a device-side USB stack. Implementations for common classes such as USB serial (CDC ACM) and USB HID are available, and a rich builder API allows building your own.\n\n- **Bootloader and DFU** -\n  [embassy-boot](https://github.com/embassy-rs/embassy/tree/master/embassy-boot) is a lightweight bootloader supporting firmware application upgrades in a power-fail-safe way, with trial boots and rollbacks.\n\n## Sneak peek\n\n```rust,ignore\nuse defmt::info;\nuse embassy_executor::Spawner;\nuse embassy_time::{Duration, Timer};\nuse embassy_nrf::gpio::{AnyPin, Input, Level, Output, OutputDrive, Pin, Pull};\nuse embassy_nrf::{Peri, Peripherals};\n\n// Declare async tasks\n#[embassy_executor::task]\nasync fn blink(pin: Peri\u003c'static, AnyPin\u003e) {\n    let mut led = Output::new(pin, Level::Low, OutputDrive::Standard);\n\n    loop {\n        // Timekeeping is globally available, no need to mess with hardware timers.\n        led.set_high();\n        Timer::after_millis(150).await;\n        led.set_low();\n        Timer::after_millis(150).await;\n    }\n}\n\n// Main is itself an async task as well.\n#[embassy_executor::main]\nasync fn main(spawner: Spawner) {\n    let p = embassy_nrf::init(Default::default());\n\n    // Spawned tasks run in the background, concurrently.\n    spawner.spawn(blink(p.P0_13.into()).unwrap());\n\n    let mut button = Input::new(p.P0_11, Pull::Up);\n    loop {\n        // Asynchronously wait for GPIO events, allowing other tasks\n        // to run, or the core to sleep.\n        button.wait_for_low().await;\n        info!(\"Button pressed!\");\n        button.wait_for_high().await;\n        info!(\"Button released!\");\n    }\n}\n```\n\n## Examples\n\nExamples are found in the\n`examples/` folder separated by the chip manufacturer they are designed to run on. For example:\n\n* `examples/nrf52840` run on the\n  `nrf52840-dk` board (PCA10056) but should be easily adaptable to other nRF52 chips and boards.\n* `examples/nrf5340` run on the `nrf5340-dk` board (PCA10095).\n* `examples/stm32xx` for the various STM32 families.\n* `examples/rp` are for the RP2040 chip.\n* `examples/std` are designed to run locally on your PC.\n\n### Running examples\n\n- Install `probe-rs` following the instructions at \u003chttps://probe.rs\u003e.\n- Change directory to the sample's base directory. For example:\n\n```bash\ncd examples/nrf52840\n```\n\n- Ensure `Cargo.toml` sets the right feature for the name of the chip you are programming.\n  If this name is incorrect, the example may fail to run or immediately crash\n  after being programmed.\n\n- Ensure `.cargo/config.toml` contains the name of the chip you are programming.\n\n- Run the example\n\nFor example:\n\n```bash\ncargo run --release --bin blinky\n```\n\nFor more help getting started, see [Getting Started][1] and [Running the Examples][2].\n\n## Developing Embassy with Rust Analyzer-based editors\n\nThe [Rust Analyzer](https://rust-analyzer.github.io/) is used by [Visual Studio Code](https://code.visualstudio.com/)\nand others. Given the multiple targets that Embassy serves, there is no Cargo workspace file. Instead, the Rust Analyzer\nmust be told of the target project to work with. In the case of Visual Studio Code,\nplease refer to the `.vscode/settings.json` file's `rust-analyzer.linkedProjects`setting.\n\n## Minimum supported Rust version (MSRV)\n\nEmbassy is guaranteed to compile on stable Rust 1.75 and up. It *might*\ncompile with older versions, but that may change in any new patch release.\n\n## Why the name?\n\nEMBedded ASYnc! :)\n\n## License\n\nEmbassy is licensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n[1]: https://github.com/embassy-rs/embassy/wiki/Getting-Started\n[2]: https://github.com/embassy-rs/embassy/wiki/Running-the-Examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembassy-rs%2Fembassy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembassy-rs%2Fembassy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembassy-rs%2Fembassy/lists"}