metanorma / ruby-packer

Packing your Ruby application into a single executable.
MIT License
6 stars 2 forks source link

Replace `enclose_io_memfs.c` in `make_enclose_io_memfs` with `INCBIN` #27

Open ronaldtse opened 3 years ago

ronaldtse commented 3 years ago

This code inlines a SquashFS image in an array in a .c file which is hugely slow and inefficient:

https://github.com/metanorma/ruby-packer/blob/0d12afaafefa6ca4dfac4a3f8ced143bf1214205/lib/compiler.rb#L677-L690

We can directly link this image using mechanisms described here:

Original problems described in #4.

Originally posted by @ronaldtse in https://github.com/metanorma/ruby-packer/issues/16#issuecomment-845274950