Shipping the interpreter

I figure that should be fine. We just need an implementation of dlopen. But either of them will also require a dynamic loader (ld.so) available to be able to actually load shared libraries. That’s probably the most challenging problem because a statically linked binary misses that.
And that works I suppose there might then appear issues with libraries that are statically linked into the compiler and dynamically loaded by the interpreted program.

Ah, If I understand correctly, libdl ships with libc (which Crystal uses musl because glibc doesn’t work with static linking well?), and the since libdl isn’t available when linking statically, could it be provided with the binary?

Would that require building musl along with static Crystal and exporting them together? Or are there other challenges?

It doesn’t seem to matter too much, as this only appears to be a problem with using a static build. I can do a dynamic build on my own without much problems.

Is the interpreter also be available on windows ?