**Crystal was never meant to compile individual modules, and will likely never be. This is by design.**
Now, my previous comment is kinda outdated today. I then investigated and fixed a couple issues:
- Add the ability to create a dynamic library · Issue #921 · crystal-lang/crystal · GitHub (and follow up comments)
- Set linkage of `__crystal_*` funs to internal by ysbaddaden · Pull Request #15439 · crystal-lang/crystal · GitHub
- Fix: don't set external linkage when `@[NoInline]` is specified by ysbaddaden · Pull Request #15424 · crystal-lang/crystal · GitHub
But it’s still not possible to compile multiple crystal libraries and link these together unless you give up the stdlib.