tock
embassy

tock | embassy | |
---|---|---|
34 | 82 | |
5,640 | 6,230 | |
1.9% | 6.6% | |
9.9 | 9.9 | |
1 day ago | 4 days ago | |
Rust | Rust | |
GNU General Public License v3.0 or later | 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.
tock
-
Pebble smartwatch firmware released as open-source
TL;DR: No. Maybe? Depends.
It's probably reasonable to make a distinction between "Real Time" desktop/server OS (on CPUs) vs "Real Time" embedded hardware OS (on MCUs).
(Even aside from any hard-/soft- real time distinction.)
On the embedded side, in addition to FreeRTOS (upon which Pebble OS is built), I'm aware of others with reasonably high profile such as:
* Zephyr (Linux Foundation, C): https://en.wikipedia.org/wiki/Zephyr_(operating_system)
* NuttX (Apache Software Foundation, C & C++): https://en.wikipedia.org/wiki/NuttX
In addition, there's also some "up & coming" Rust language projects which fall somewhere along the "framework" to "OS" spectrum (in part, via https://arewertosyet.com):
* Tock: https://github.com/tock/tock
* Embassy: https://github.com/embassy-rs/embassy
* Hubris: https://hubris.oxide.computer
On the desktop side, I seem to recall in the past, OS such as BeOS & QNX have been presented as a possible future for real time desktop OS that hasn't arrived.
As someone else already mentioned, PREEMPT_RT being merged for Linux is a recent development somewhat in this space which could have impact on both desktop & "embedded" situations but suitability varies dependent on, say, whether you're wanting to use it for audio production versus controlling some 10 tonne robot operating next to humans.
Hope this at least goes some way to answering your question. :)
- A secure embedded operating system for microcontrollers
-
OxidOS Automotive
Hi! This is Daniel from OxidOS Automotive (stating this for disclaimer purposes).
Yes, our OS is based on TockOS, and our CEO (Alex Radovici) is #7 in the contributors list (https://github.com/tock/tock/graphs/contributors), with other colleagues contributing in the past years.
- What is the best library to write a SCADA-like application for web?
-
Safety vs. Performance. A case study of C, C++ and Rust sort implementations
I'm definitely not the best person to answer this, but honestly it's not bad. Here's an example of a moderately complex peripheral, the cortex-m MPU, and how one rust OS handles it:
https://github.com/tock/tock/blob/3a0527d586702b8ae8cb242391...
Reads and writes turn into volatile reads, so everything works out under the hood. You get the benefits of everything having good names, declared sizes, and proper typing on your register accesses. You can extend that to bit accesses as well.
Rust still has a few areas it isn't competitive in, like your hyper limited or obscure chips (e.g. 8051s, XAP), mature tooling around formal methods, and a certification story for safety critical code. People are working on these latter two issues (e.g. ferrocene) and supposedly very close to public delivery, but you know how slow the industry is to adopt new things even then.
- Ask HN: Any Hardware Startups Here?
-
Real-Time Operating Systems 101: Basics for Efficient Computing
There's Tock (https://www.tockos.org/), which is written in Rust (with sprinkles of assembly).
-
Unwinding the Stack the Hard Way
Yeah, and I like I mentioned in the earlier comment, omitting the frame pointer reduces code size by 10% on RISC-V targets, which is huge when dealing with embedded flash: https://github.com/tock/tock/pull/1660
- Where are the C Alternatives?
-
Embedded real time OS
Tock is an excellent embedded OS written in Rust and has some good industrial support. I think Tock gets a lot of stuff right and I highly recommend some of the talks the developers gave on it.
embassy
- Rust async framework for embedded systems
-
Pebble smartwatch firmware released as open-source
TL;DR: No. Maybe? Depends.
It's probably reasonable to make a distinction between "Real Time" desktop/server OS (on CPUs) vs "Real Time" embedded hardware OS (on MCUs).
(Even aside from any hard-/soft- real time distinction.)
On the embedded side, in addition to FreeRTOS (upon which Pebble OS is built), I'm aware of others with reasonably high profile such as:
* Zephyr (Linux Foundation, C): https://en.wikipedia.org/wiki/Zephyr_(operating_system)
* NuttX (Apache Software Foundation, C & C++): https://en.wikipedia.org/wiki/NuttX
In addition, there's also some "up & coming" Rust language projects which fall somewhere along the "framework" to "OS" spectrum (in part, via https://arewertosyet.com):
* Tock: https://github.com/tock/tock
* Embassy: https://github.com/embassy-rs/embassy
* Hubris: https://hubris.oxide.computer
On the desktop side, I seem to recall in the past, OS such as BeOS & QNX have been presented as a possible future for real time desktop OS that hasn't arrived.
As someone else already mentioned, PREEMPT_RT being merged for Linux is a recent development somewhat in this space which could have impact on both desktop & "embedded" situations but suitability varies dependent on, say, whether you're wanting to use it for audio production versus controlling some 10 tonne robot operating next to humans.
Hope this at least goes some way to answering your question. :)
- 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/
What are some alternatives?
smoltcp - a smol tcp/ip stack
rtic - Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers
nrf-hal - A Rust HAL for the nRF family of devices
rust-raspberrypi-OS-tutorials - :books: Learn to write an embedded OS in Rust :crab:
crates.io - The Rust package registry
awesome-embedded-rust - Curated list of resources for Embedded and Low-level development in the Rust programming language
hubris - A lightweight, memory-protected, message-passing kernel for deeply embedded systems.
rusty-clock - An alarm clock with environment stats in pure bare metal embedded rust
redox - Mirror of https://gitlab.redox-os.org/redox-os/redox
async-std - Async version of the Rust standard library
