PicoRuby Compiler (picorbc) - Cross-platform Ruby to mruby bytecode compiler
npm install @picoruby/picorbcCross-platform PicoRuby Compiler (picorbc) - Compile Ruby scripts to mruby bytecode (.mrb files)
``bash`
npm install -g @picoruby/picorbc
`bash`
picorbc script.rb
This will generate script.mrb in the same directory.
`bash
picorbc [switches] programfile...
switches:
-c check syntax only
-o
-v print version number, then turn on verbose mode
-g produce debugging information
-B
-S dump C struct (requires -B)
-s define
--remove-lv remove local variables
--no-ext-ops prohibit using OP_EXTs
--no-optimize disable peephole optimization
--verbose run at verbose mode
--version print the version
--copyright print the copyright
`
`bashCompile a single Ruby file
picorbc hello.rb
PicoRuby is an mruby ecosystem which is:
- Lightweight and memory efficient
- Suitable for embedded systems like microcontrollers and browser
- Compatible with mruby bytecode
Learn more at https://github.com/picoruby/picoruby
MIT