DEV Community

Cover image for Reproducible Embedded Rust Development with Docker (Introducing kariRS)
Vincent Muriithi
Vincent Muriithi

Posted on

Reproducible Embedded Rust Development with Docker (Introducing kariRS)

The Problem with Embedded Development Environments

Embedded development often starts with environment setup — installing compilers, configuring toolchains, setting up flashing utilities, and resolving dependency issues across different systems.

This setup process can be time-consuming and inconsistent, especially when working across multiple machines or CI environments.

To simplify this workflow, I created kariRS, a Rust-based embedded framework that provides a structured setup-and-loop execution model for microcontrollers. To make onboarding even easier, kariRS is now available as a pre-configured Docker image.

The goal is simple:

Start embedded development immediately without spending hours configuring toolchains.


What is kariRS?

kariRS is a Rust-based embedded framework designed to provide:

  • A structured initialization and runtime execution model
  • A unified CLI for project management and flashing
  • Hardware abstraction for supported microcontrollers
  • A consistent development experience across systems

It focuses on reducing setup complexity while allowing developers to benefit from Rust’s memory safety and strong typing.


The Problem with Embedded Toolchains

Anyone who has worked with embedded development knows the common issues:

  • Different compiler versions across machines
  • Missing dependencies
  • Broken flashing tools
  • CI environments behaving differently from local setups

This leads to the classic situation:

“It works on my machine.”

Docker helps solve this by packaging the entire development environment into a reproducible container.


Introducing the kariRS Docker Image

The official kariRS Docker image includes:

  • Rust nightly + cargo preinstalled
  • Embedded AVR toolchains (gcc-avr, avr-libc, avrdude)
  • kariRS CLI ready to use
  • A fully isolated and reproducible environment

This allows developers to run kariRS without installing any embedded tooling locally.


Getting Started

Pull the image:

docker pull vincentmuriithi/karirs:latest
Enter fullscreen mode Exit fullscreen mode

Run an interactive container:

docker run -it --rm vincentmuriithi/karirs
Enter fullscreen mode Exit fullscreen mode

Create a project inside the container:

kari new blink
cd blink
kari build
Enter fullscreen mode Exit fullscreen mode

Working with Local Projects (Recommended)

Mount your workspace so projects persist outside the container:

docker run -dit \
  --name kariRS \
  -v "$(pwd):/workspace" \
  vincentmuriithi/karirs:latest bash
Enter fullscreen mode Exit fullscreen mode

Why Docker for Embedded Development?

Using Docker provides:

  • Reproducible builds
  • Zero environment setup
  • Easy CI integration
  • Consistent results across machines

This is especially useful for teams or open-source contributors who need identical build environments.

Links

Docker image: https: //hub.docker.com/r/vincentmuriithi/karirs
Github repository: https://github.com/vincentmuriithi/kariRS

If you’re interested in reproducible embedded workflows or experimenting with embedded Rust, feel free to try it out and share your thoughts.

Top comments (0)