@picoruby/picorbc
v3.4.0
Published
PicoRuby Compiler (picorbc) - Cross-platform Ruby to mruby bytecode compiler
Maintainers
Readme
@picoruby/picorbc
Cross-platform PicoRuby Compiler (picorbc) - Compile Ruby scripts to mruby bytecode (.mrb files)
Installation
npm install -g @picoruby/picorbcUsage
picorbc script.rbThis will generate script.mrb in the same directory.
Options
picorbc [switches] programfile...
switches:
-c check syntax only
-o<outfile> place the output into <outfile>; required for multi-files
-v print version number, then turn on verbose mode
-g produce debugging information
-B<symbol> binary <symbol> output in C language format
-S dump C struct (requires -B)
-s define <symbol> as static variable
--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 copyrightExamples
# Compile a single Ruby file
picorbc hello.rb
# Specify output file
picorbc -o output.mrb script.rb
# Compile multiple files
picorbc -o combined.mrb file1.rb file2.rb file3.rb
# Check syntax only
picorbc -c script.rb
# Verbose mode
picorbc -v script.rbAbout PicoRuby
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
License
MIT
