Issue #18265 has been updated by Eregon (Benoit Daloze).


FYI, MRuby supports this. Of course it just embeds the bytecode in the binary, no actual AOT compilation of Ruby code.

Also there are various gems which make this possible for CRuby, notably https://github.com/pmq20/ruby-packer, although I'm not sure how easy/hard it is to use them.

Personally I'm not sure I see the advantage of one executable vs one archive with a clear executable inside.
One executable forces using a virtual file system and potentially extracting .so files in a temporary directly on every execution
(e.g. dlopen()/native library deps need a real file on the filesystem, and that's needed for C extensions which can't easily be statically-linked),
vs the archive working much more similarly to regular Ruby installations.

----------------------------------------
Feature #18265: Self-contained one-bianry feature which discuss on ruby kaigi 2021 day 2, 《 Ruby Committers vs the World / CRuby Committers》
https://bugs.ruby-lang.org/issues/18265#change-94267

* Author: zw963 (Wei Zheng)
* Status: Open
* Priority: Normal
----------------------------------------
![](clipboard-202110232053-mgbon.png)

https://www.youtube.com/watch?v=zQnN1pqK4FQ

Yes, what i said is this.

I personal propose add this feature into ruby 3 in the future, i consider this is a killer
advantage compare to others dynamic language.

And, this feature is very important for distribute code to the third party.(e.g. client)

in fact, my friend switch from ruby to go recent days, the only reason is, it could not find out
a usable solution to distribute code to our client safely.


Because i could not find out a similar issue, so, just create this for discuss.

BTW: maybe not so useful, Emacs editor master(since version 28), which can native compilation of Elisp files has greatly improved performance and start-up time, i don't know if this tech can be borrow from there for ruby.

anyway, i consider both are similarities.


i guess that may help on how to archive this.



---Files--------------------------------
clipboard-202110232053-mgbon.png (169 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>