Mruby/C and picoruby: high level langs in low-level devices?
Published on: 2025-06-01 14:20:42
PicoRuby
PicoRuby is an alternative mruby implementation which is:
Small foot print ROM: 256 KB (depending on build config) RAM: 128 KB or less (depending on app code) (Figures in 32 bit architecture)
Portable Depends on only standard C library such as glibc, Newlib or Newlib-nano
Reference microcontroller boards Raspberry Pi Pico - Arm Cortex-M0+, 264 KB RAM, 2 MB Flash
API documentation with some demo videos
https://picoruby.github.io/
Depends on
mruby/c (mrubyc/mrubyc): Another implementation of mruby virtual machine
Used by
PRK Firmware: Keyboard firmware for Raspberry Pi Pico
picoruby.wasm: PicoRuby WASI runtime for WebAssembly
Build
Prerequisites C toolchain git ruby (should be CRuby 3.0+)
git clone --recursive https://github.com/picoruby/picoruby cd picoruby/ rake # PICORUBY_DEBUG=1 rake # for debug build # PICORUBY_DEBUG=1 PICORUBY_NO_LIBC_ALLOC=1 rake # for debug build using mruby/c's memory allocator bin/picoruby -e 'puts "Hello World!"'
Cross compilation
... Read full article.