embassy
nrf-hal
embassy | nrf-hal | |
---|---|---|
80 | 5 | |
6,113 | 518 | |
7.6% | 2.1% | |
9.9 | 8.6 | |
1 day ago | 2 months ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
embassy
- Embassy: Replacing RTOS with a Rust async scheduler
-
Apple is Killing Swift – A great language strangled by governance
The other comment implied it but I think it's worth pointing out that:
> embedded applications that can't have asynchronous execution
Is most definitely not the case.
They can't have the same type of async runtime that would be optimal for a web server or the likes (and I'm not sure all desktop applications and web servers are going to always benefit from the same runtime in the same way), but that's a point in favour of Rust's model imho
If you're interested this is an embedded async runtime that's expected to run in no-std and no-alloc environments
https://embassy.dev/
-
Impl Snake For Micro:bit - Embedded async Rust on BBC Micro:bit with Embassy
In this article, I will guide you through creating a Snake game in embedded Rust on the BBC Micro:bit using the asynchronous framework Embassy.
-
A review after using Rust on embedded in production for over a year
Rust solved this by autogenning code from mfgr published device xml descriptors. Eg https://embassy.dev/
Better than any C(++) embedded hal I've used
- Building a GATT Server on Pi Pico W
- Embassy-rs/embassy: Modern embedded framework, using Rust and async
- Embedded Swift [video]
-
I like the RP2040
If I get your question right, you still need some host software (like a rust compiler)! It's not exactly micropython experience.
The bare minimum would be one of the examples [1] compiled with a Rust compiler and then transformed into a .uf2 file with elf2uf2 [2]. You can then just drag and drop the .uf2 file into the "mass storage device" presented by the bootloader. To get the bootloader to mount, you press a button on a Raspberry Pico (or short two outputs if you're using bare RP2040) while plugging it in.
You'll probably want a debug probe [3] driven by probe-rs [4] at some point, it's just much more convenient to flash and debug with it.
[1]: https://github.com/embassy-rs/embassy/tree/main/examples/rp/...
[2]: https://github.com/JoNil/elf2uf2-rs
[3]: https://www.raspberrypi.com/documentation/microcontrollers/d...
[4]: https://probe.rs/
- Embassy 在 Blue Pill 上的点灯案例
-
Why choose async/await over threads?
thanks. looked that up. for the curious: https://embassy.dev/
nrf-hal
-
Rust newcomers are 70x less likely to create vulnerabilities than C++ newcomers [pdf]
You should try again. I think that code is verbose because of the borrowing and because you're trying to do a one-liner. I use the nrf-hal library with the nrf52840, and the code reads pretty nicely. Here's an example:
https://github.com/nrf-rs/nrf-hal/blob/master/examples/blink...
-
Any good examples of using embedded Rust with an existing embedded C codebase?
Reading nrf-hal source, unfortunately new does re-configure the UARTE, and there is not a new_unchecked. The solution I can think of is to duplicate the write code with nrf52833_hal::pac::UARTE0. The Uarte type does not contain any metadata, it exists purely to guard the init of UARTE.
- Rust on the MOS 6502: Beyond Fibonacci
-
First steps with Embedded Rust: Selecting a board
Really good. Check out the examples in the nrf-hal repo. Also, if you don't mind forking out for some extra components the Knurling sessions by Ferrous Systems are ace.
-
I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun
The embedded HAL crates do this with extensive use of macros, for example: https://github.com/nrf-rs/nrf-hal/blob/aae17943efc24baffe30b...
This solution makes sense given the constraints of Rust, but there's quite a cost in terms of compiler time and cognitive overhead to understand what is going on.
(Aside: I didn't use the HAL in my Rust firmware, that's a higher layer of abstraction; I only used the PAC crates.)
What are some alternatives?
rtic - Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers
ziglings - Learn the Zig programming language by fixing tiny broken programs.
tock - A secure embedded operating system for microcontrollers
drogue-device - A distribution of tools and examples for building embedded IoT applications in Rust
smoltcp - a smol tcp/ip stack
nrf-softdevice
crates.io - The Rust package registry
riscv-rust-quickstart - A template for building Rust applications for HiFive1 boards
rusty-clock - An alarm clock with environment stats in pure bare metal embedded rust
CC65-Advanced-Optimizations - How to optimize C code for CC65 compiler
rust-mos - Empowering everyone to build reliable and efficient software.
zephyr - Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.