Pragmatic Embedded Rust

What is Bobbin?

Bobbin is an open-source, cross-platform, vendor-independent development system for embedded programming in the Rust programming language. It integrates with existing proprietary and open-source tools and aims to provide comprehensive Rust libraries for MCUs, boards, and peripheral devices, along with clear documentation including practical examples.

Bobbin is simple enough to be used by novices and hobbyists, but flexible and powerful enough to be used by teams developing complex safety-critical systems. It will run out-of-the-box on popular board families such as Arduino, Teensy, FRDM and Nucleo, but it will be easy to adapt to custom boards and new MCUs. It wil support new programming paradigms such as Futures and Async / Await and also traditional embedded practices such as superloops.

Bobbin is distributed under the terms of both the MIT license and the Apache License (Version 2.0).


View on Github

bobbin-cli is a command line application that automates your embedded development workflow. It includes:


bobbin-dsl is a sexp-based hardware description language that is semantically similar to SVD, but with a number of extensions. It is designed to be usable for describing both MCUs and non-MCU devices connected through I2C, SPI, UART and other interfaces.

bobbin-dsl is intended to be pleasing to read and write by hand. It is possible to translate automatically from SVD to bobbin-dsl.

bobbin-dsl is used for build-time generation of the bobbin-mcu low-level device libraries.


bobbin-mcu is a collection of low-level and mid-level Rust crates for a variety of MCUs. The low-level "chip" modules are automatically generated from bobbin-dsl files, and the mid-level "hal" modules are hand written in an idiomatic Rust style. These crates are grouped by vendor family (currently Atmel SAM, TI Tiva, Freescale Kinetis, STM32) and then by model; variants that are essentially the same but with different SRAM, Flash and numbers of peripherals are be grouped in an individual crate.

Peripherals that are common to multiple models within a vendor family are broken out into a vendor-common crate that is shared by all chips using those peripherals. There is also a separate bobbin-cortexm crate that defines peripherals that are common across Cortex-M MCUs.


bobbin-boards is a collection of Rust crates supporting a variety of development boards, including Arduino Zero, Teensy, TI LaunchPad, Freescale FRDM, and ST Nucleo boards.

Each crate is for a specific board + MCU combination, and includes access to LEDs, Buttons, and a serial console (one connected to an embedded debugger if available). Board crates may include libraries for access to on-board peripherals.

Devices with Arduino-compatible pin headers include mappings to native pins and provide easy access to basic Arduino-like functionality.


bobbin-devices is a collection of Rust crates supporting a number of peripherals. Registers are automatically generated from bobbin-dsl files along with traits that should be implemented to provide physical access to the devices. Additional functionality such as initialization code or higher-level drivers may be included.