Skip to content

tamatebako/tebako-runtime

Repository files navigation

Tebako-runtime

A helper Gem for tebako image packager

Test and release Test coverage

Tebako is an executable packager. It packages a set of files into a DwarFS file system for read-only purposes.

After packaging the file system into an image, Tebako produces a single executable binary that allows the user to run a selected file from the packaged filesystem.

Tebako image is essentially a patched Ruby with embedded filesystem as shown in the diagram.

Tebako architecture

Inside tebako image there are Ruby gems that can access native extensions. If a gem loads native extension using rubygem features this call is intercepted, a copy extension shared object is placed to host temporary folder, all further calls to extension are routed to the copy of extension (Item 2 on the diagram).

Gems and extensions can reference other libraries, executable and data files using native system calls (Items 5, 6). Tebako cannot intercept such calls and route them correctly to memory filesystem. Tebako shall offload required file from memfs to temporary folder and reroute system calls as needed.

tebako-runtime (this Gem) provides support for known Gems that use system calls to access executable or data files.