Open-source Contribution
Open-source Projects
Hopter
Hopter is a Rust-based embedded operating system designed to enable memory-safe, robust, and responsive embedded applications. Applications built with Hopter require a customized Rust compiler that generates instrumented code to cooperate with the kernel. The compiler helps enhance memory safety and system reliability without altering standard Rust syntax. Hopter can interoperate with community-driven open-source HAL libraries.
- Memory safety: Hopter prevents stack overflows alongside other memory safety guarantees provided by Rust. The customized compiler generates a function prologue (initial instructions executed at function entry) that checks available stack space before executing the function body.
- Robustness: Hopter gracefully recovers applications from Rust panics by running a stack unwinder, which cleans up panicked tasks or IRQ handlers. Hopter supports restartable tasks that automatically restarts execution from the entry closure after a panic. Additionally, Hopter converts stack space exhaustion into a panic and allows recovery using the same mechanism.
- Responsiveness: Hopter features zero-latency IRQ handling. The kernel never disables IRQs, even within traditionally critical sections, ensuring immediate handling of pending IRQs. Hopter achieves it through a novel internal synchronization primitive called soft-locks, which resolves race conditions between IRQs and tasks without disabling IRQs.
While Hopter strongly encourages using safe Rust, it also permits the cautious use of unsafe Rust code. Therefore, Hopter expects benign but not malicious applications, and its threat model is similar to that assumed by FreeRTOS.
Hadusos
Hadusos is a session protocol allowing reliable communication over serial devices. Two participants of the protocol either assumes the sender or the receiver role at a time, thus half-duplex. Hadusos has the following features:
- Simple: The simple design of the protocol leads to slim implementation code and thus small binary overhead which is especially important for storage constrained embedded devices.
- Zero-copy: No dynamic memory allocation is needed. Most received bytes goes directly into the client buffer without any copying, and all bytes to be sent goes directly to the serial devices.
- Panic-free: The protocol implementation code never panics.
Documentation: https://docs.rs/hadusos/0.2.1/hadusos/
Other Contributions
stm32f4xx-hal
A Rust embedded-hal HAL for all MCUs in the STM32F4 family.
Features and bug fix patches merged:
- https://github.com/stm32-rs/stm32f4xx-hal/pull/662
- https://github.com/stm32-rs/stm32f4xx-hal/pull/736
- https://github.com/stm32-rs/stm32f4xx-hal/pull/737
- https://github.com/stm32-rs/stm32f4xx-hal/pull/738
- https://github.com/stm32-rs/stm32f4xx-hal/pull/743
LLVM
A collection of modular and reusable compiler and toolchain technologies.
Features and bug fix patches merged:
- https://github.com/llvm/llvm-project/commit/adc26b4eaedc50f1b99d5af5c7e248966fced660
- https://github.com/llvm/llvm-project/commit/bd606afe26f258d081fbe025b20a71b277c1edde
- https://github.com/llvm/llvm-project/commit/7e8af2fc0c068de8bb47d8046b8483234fab3b13
- https://github.com/llvm/llvm-project/commit/1d0ccebcd725309399262af346494242b064e2ed
owning-ref
A library for creating references that carry their owner with them.
Feature submitted as pull request: