Files
mruby-mruby/mrbgems/mruby-bin-strip
Yukihiro "Matz" Matsumoto 9ad72e3a96 mrbgems: add README documentation for mruby-bin-* gems
- mruby-bin-config
- mruby-bin-debugger
- mruby-bin-mrbc
- mruby-bin-mruby
- mruby-bin-strip

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-11 18:09:10 +09:00
..
2025-05-14 01:14:02 +10:00

mruby-bin-strip

mruby-strip removes debug information from compiled mruby bytecode files to reduce file size.

Usage

mruby-strip [switches] irepfiles

Options

  • -l, --lvar - remove LVAR section too (local variable names)

Examples

# Strip debug info from a compiled file
mruby-strip script.mrb

# Strip debug info and local variable names
mruby-strip -l script.mrb
mruby-strip --lvar script.mrb

# Strip multiple files
mruby-strip file1.mrb file2.mrb file3.mrb

Notes

  • The input files are modified in-place
  • Stripping removes debug symbols used by the debugger (mrdb)
  • The -l option additionally removes local variable names, which are needed for some reflection features
  • Stripped files will still execute correctly but cannot be debugged effectively

License

MIT License - see the mruby LICENSE file.