• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dump compiled iseq by binary (kakidasu) and load binary (yomidasu)

Yomikomu

  • yomikomu gem enables to load compiled instruction sequences (bytecodes).
  • kakidasu command compiles and stores compiled instruction sequences (bytecodes).

This gem requires Ruby 2.3.0. Most of code is ported from ruby/sample/iseq_load.rb.

Installation

Add this line to your application's Gemfile:

gem 'yomikomu'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yomikomu

Usage

Configuration

You can use the following configuration with environment variables.

  • YOMIKOMU_STORAGE (default: fs): choose storage type.
    • 'fs' (default) stores binaries in the same directory (for examlple, x.rb will be compiled to x.rb.yarb in the same directory).
    • 'fs2' stores binaries in specific directory.
    • 'fsgz' stores files same as 'fs', but gz compressed.
    • 'fs2gz' stores files same as 'fs2', but gz compressed.
    • 'dbm' stores binaries using dbm.
    • 'flatfile' stores binaries in one flat file. Updating is not supported. Use with YOMIKOMU_AUTO_COMPILE.
  • YOMIKOMU_STORAGE_DIR (default: "~/.ruby_binaries"): choose directory where binary files are stored.
  • YOMIKOMU_AUTO_COMPILE (default: false): if this value is true, then compile all required scripts implicitly.
  • YOMIKOMU_YOMIKOMANAI (default: not defined): disable all YOMIKOMU features.
  • YOMIKOMU_INFO (default: not defined): show some information.
  • YOMIKOMU_DEBUG (default: not defined): show more information.

Compile and store instruction sequences

You only need to use the following command.

$ kakidasu [file or dir] ...

Compile specified file or files (*.rb) in specified directory. If no files or directories are specified, then use "libdir" of installed Ruby.

Load compiled binary

You only need to require yomikomu.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ko1/yomikomu.

License

The gem is available as open source under the terms of the MIT License.

More Repositories

1

pretty_backtrace

Pretty your exception backtrace.
Ruby
646
star
2

rubyhackchallenge

Ruby
451
star
3

allocation_tracer

Add ObjectSpace::AllocationTracer module.
C
438
star
4

gc_tracer

Add GC::Tracer module.
C
308
star
5

nakayoshi_fork

Ruby
81
star
6

uc_ja

書籍『アンダースタンディング コンピュテーション』のサポートリポジトリです。
73
star
7

ractor-tvar

C
65
star
8

rspec-debug

Launch [debugger](https://github.com/ruby/debug) if spec is failed.
Ruby
35
star
9

rstfilter

Show Ruby script with execution results.
Ruby
34
star
10

kv

kv: A page viewer written in Ruby
Ruby
27
star
11

ruby-ptrace

ptrace wrapper for ruby
C
23
star
12

calleree

Calleree helps to analyze Ruby's caller-callee relationships.
C
18
star
13

vscode-ruby-rstfilter

Ruby's rstfilter extension
TypeScript
17
star
14

iseq_collector

iseq_collector gem
Ruby
16
star
15

prsnt

プレゼントを提供するためのウェブアプリケーション
Ruby
8
star
16

build-ruby

Build Ruby from source code.
Ruby
6
star
17

programming-elixir-1-6-ja

[プログラミングElixir(第2版)](https://www.ohmsha.co.jp/book/9784274226373/) サポートページ
6
star
18

simplepaste

SimplePaste web application
Ruby
5
star
19

finalize_block

This gem provide `finalize_block` method.
Ruby
4
star
20

many_examples

MaNy project examples
Ruby
3
star
21

ractor

to keep namespace
Ruby
3
star
22

ptask

Parallel task scheduler
C
2
star
23

tokyo11

Tokyo RubyKaigi 11
HTML
2
star
24

turtlefs

TurtleFS is Delay simulation file system using FUSE.
C
1
star
25

sample

1
star
26

calcard

calcard
HTML
1
star
27

ractor-lvar

Ractor::LVar
Ruby
1
star
28

pam_gh_user

1
star
29

mmapped_string

MmappedString
Ruby
1
star