Compiling Shared Libraries

Having searched how to create shared libraries with Crystal I understand there are currently some technical issues with doing so. Is it a planned feature for the future? If so do you have a particular version # in mind?

The Go language team gave up on using multiple shared libraries.

We don’t have any plan short term or even mid term to officially support external libraries. See Add the ability to create a dynamic library · Issue #921 · crystal-lang/crystal · GitHub.

While it is technically possible (when the dynamic library is compiled in release mode), you’ll quickly run into issues. For example the Mach-O executables only allows 3 personality functions, and trying to link the program will likely fail (see Set linkage of `__crystal_*` funs to internal by ysbaddaden · Pull Request #15439 · crystal-lang/crystal · GitHub), unless you go metal and ditch the stdlib and don’t use exceptions.