The question is a bit unclear, but here’s what I understand:
-
The Crystal compiler can be used as a library.
See: How can I use Crystal compiler as a library? -
Embedding an interpreter has been discussed, but I don’t know of any practical examples.
Since Crystal’s interpreter is slow to start and run, some people embed Ruby instead.
See: Anyolite 1.0.0 -
Creating C ABI-compatible shared libraries in Crystal is difficult because function types depend on how they are called.
A library compiled in one context may not be usable in another.
See: Discussion between asterite and beta-ziliani -
As far as I know, there is no standard for a Crystal-specific ABI or shared library format beyond the C ABI.
The Swift community, on the other hand, might be exploring this idea:
See: Swift ABI Stability Manifesto