December 8, 2025
The RubyWorld Conference 2025, held in Matsue, Japan, showcased an unexpected star of the ecosystem: Ruby running on microcontrollers. While the event traditionally focuses on Ruby in web, enterprise, or academic settings, this year a significant amount of attention shifted toward embedded systems, thanks to PicoRuby and the community project mruby Girls.
Rather than treating hardware programming as something exclusive to C/C++, this movement positions Ruby as a practical and expressive language for IoT, prototyping, wearables, and educational electronics.
1. What Makes PicoRuby Special for Developers
PicoRuby is not “just another port” of Ruby. It is a purpose-built Ruby runtime optimized for microcontrollers , particularly the ESP32 and RP2040 families.
Lightweight Runtime Core
PicoRuby contains:
- A small VM with a compact bytecode instruction set.
- A built-in minimal GC optimized for devices with limited heap.
- A simplified standard library — only modules feasible for MCU-scale memory.
- Optional extensions that can be stripped out at build time.
Developers benefit from:
- Instant boot times (tens of milliseconds)
- Fast bytecode execution with predictable performance
- Deterministic memory behavior compared to CRuby
This makes PicoRuby viable even on devices with:
- 520 KB SRAM (ESP32)
- 264 KB SRAM (RP2040)
Development Workflow
PicoRuby provides a comfortable workflow for Ruby developers:
- Write Ruby code Typically small scripts defining behavior (LED patterns, motion processing, sensor polling).
- Compile to bytecode Using prc (PicoRuby Compiler), Ruby files are converted into compact .mrb bytecode.
- Deploy to device Bytecode is sent via USB, serial, or OTA depending on board.
- Run via the built-in REPL This is a game-changer — you can execute Ruby commands directly on the microcontroller.
Example of live-coding LEDs:
led = LED.new
loop do
led.toggle
sleep 0.1
end
This level of interactivity is unusual for embedded development.
2. Hardware Used in mruby Girls Matsue 1st
The workshop centered on the M5Stack ATOM Matrix , an ESP32-based device perfect for beginners and experienced developers alike.
Key Specs
- ESP32-PICO-D4 SoC
- Dual-core Xtensa 240 MHz
- 4 MB Flash
- 6-axis IMU (MPU6886)
- Programmable 5×5 RGB LED matrix
- Built-in IR transmitter
- USB-C interface
- GPIO expansion compatibility
Why this hardware works well with PicoRuby:
- Sufficient RAM/flash for the VM
- Built-in sensors to demonstrate more than “blink an LED”
- RGB matrix enables visual feedback without external components
- Strong community support and documentation
3. Technical Highlights From the RubyWorld Talks
“Why Now Is the Right Time for PicoRuby” — Hitoshi Hasumi
Hasumi focused on why PicoRuby is ready for real-world adoption.
Key technical points:
- PicoRuby’s VM now supports:
- Improvements in garbage collection reduce pauses significantly.
- The environment setup is drastically simplified compared to vanilla mruby/mruby/c.
Of particular interest:
PicoRuby’s compiler no longer requires developers to fight with cross-compilation chains — bytecode is architecture-agnostic and runs on all PicoRuby-compliant runtimes.
This makes embedded Ruby far more accessible to developers used to CRuby.
“Exploring Electronic Engineering with PicoRuby” — Hayao Kimura
Kimura delivered practical engineering examples, demonstrating that PicoRuby is not just “cute”—it is functional for real embedded workflows.
Examples included:
1. Real-time sensor loops Using the IMU to detect motion and apply smoothing filters written in Ruby.
imu = IMU.new
loop do
x, y, z = imu.accel
puts "Accel: #{x}, #{y}, #{z}"
sleep 0.01
end
2. DIY radio and wireless communication Testing IR transmissions using Ruby code. On microcontrollers, timing is critical — PicoRuby’s low-level timing hooks made this possible.
3. Custom keyboards Generating USB HID events entirely from Ruby running on the device.
4. Inside the mruby Girls Workshop — Technical Breakdown
Although the event targets beginners, the hands-on flow demonstrates real embedded concepts:
Step 1 — Bootstrapping the Environment
The workshop used a pre-built PicoRuby image with:
- LED driver library
- IMU library
- input/output API
- serial console support
Flashing the device took seconds.
Step 2 — Understanding the REPL Execution Model
Every participant interacted directly with the device via:
pry-picoruby
This allowed:
- checking pin states
- reading sensor outputs
- executing dynamic Ruby expressions without rebooting
Step 3 — Using Prewritten Ruby Modules
Modules included:
- LED
- Matrix
- IMU
- Button
- Timer
- System
These wrap low-level ESP-IDF functions in Ruby.
Example: controlling the 5×5 matrix in a loop:
m = Matrix.new
(0..4).each do |x|
(0..4).each do |y|
m.set_pixel(x, y, [255, 0, 0])
end
end
m.show
Step 4 — Building Interactive Projects
One participant demonstrated a complete game loop :
- IMU controls horizontal movement
- falling blocks generated randomly
- collision detection running in Ruby arrays
- LED matrix used as display
- timing controlled with Ruby’s sleep
This is impressive given the limited hardware constraints.
5. Why PicoRuby Matters for the Future of Ruby
A. Pragmatic Embedded Development
Developers get:
- faster iteration than C/C++
- easier debugging
- readable, expressive code
B. Educators Gain a Friendly On-ramp
Ruby is ideal for teaching concepts like:
- loops
- state machines
- hardware I/O
- concurrency
- events and callbacks
C. Expanding Ruby’s Ecosystem
We are seeing:
- Ruby on microcontrollers
- Ruby in robotics
- Ruby in IoT
- Ruby in prototyping hardware startups
PicoRuby could become Ruby’s bridge into:
- interactive art
- wearables
- STEM classrooms
- smart home devices

Got questions for Matz? Ask them live at the conference.
6. Conclusion: Ruby Has Entered the Embedded Era
RubyWorld Conference 2025 marked a turning point. For the first time, embedded Ruby was not just a curiosity — it was presented as a mature, stable, and productive way to build hardware projects.
Combined with the inclusive and hands-on mruby Girls initiative, PicoRuby proved that:
- Ruby can run on real hardware
- Ruby is expressive enough for embedded development
- Ruby lowers the barrier to electronics
- Ruby’s community is ready to welcome new domains
This isn’t a niche corner of the ecosystem anymore — it’s the beginning of a larger movement.



Top comments (0)