This is a list of third-party libraries used by the Crystal compiler and the standard library.
Core runtime dependencies¶
The libraries in this section are always required by Crystal's stdlib runtime. They must be present for building or running any Crystal program that uses the standard library.
Avoiding these dependencies is only possible when not using the standard library (
--prelude=none compiler option).
A major component is the system library. Selection depends on the target platform and multiple are supported.
This usually includes the C standard library as well as additional system libraries such as
which may be part of the C library or standalone libraries. On most platforms all these libraries are provided by the operating system.
|glibc||standard C library for Linux||LGPL|
|musl libc||standard C library for Linux||MIT|
|FreeBSD libc||standard C library for FreeBSD||BSD|
|NetBSD libc||standard C library for NetBSD||BSD|
|OpenBSD libc||standard C library for OpenBSD||BSD|
|Dragonfly libc||standard C library for DragonflyBSD||BSD|
|macOS libsystem||standard C library for macOS||Apple|
|MSVCRT||standard C library for MSVC compiler (Windows)|
|WASI||WebAssembly System Interface||Apache v2 and others|
|bionic libc||C library for Android||BSD-like|
Other runtime libraries¶
|Boehm GC||The Boehm-Demers-Weiser conservative garbage collector. Performs automatic memory management.||MIT-style|
|Libevent||An event notification library. Implements concurrency features such as
|compiler-rt builtins||Provides optimized implementations for low-level routines required by code generation, such as integer multiplication. Several of these routines are ported to Crystal directly.||MIT / UIUC|
Optional standard library dependencies¶
These libraries are required by different parts of the standard library, only when explicitly used.
Regular Expression engine¶
|PCRE2||Perl Compatible Regular Expressions, version 2.||BSD|
|PCRE||Perl Compatible Regular Expressions.||BSD|
Big types such as
|GMP||GNU multiple precision arithmetic library.||LGPL v3+ / GPL v2+|
|MPIR||Multiple Precision Integers and Rationals, forked from GMP. Used on Windows.||GPL-3.0 and LGPL-3.0|
This is either a standalone library or may be provided as part of the system library on some platforms. May be disabled with the
-Dwithout_iconv compile-time flag.
Using a standalone library over the system library implementation can be enforced with the
-Duse_libiconv compile-time flag.
|libiconv (GNU)||Internationalization conversion library.||LGPL-3.0|
LibreSSL are supported and the bindigns automaticall detect which library and API version is available on the host system.
|OpenSSL||Implementation of the SSL and TLS protocols||Apache v2 (3.0+), OpenSSL / SSLeay (1.x)|
|LibreSSL||Implementation of the SSL and TLS protocols; forked from OpenSSL in 2014||ISC / OpenSSL / SSLeay|
Other stdlib libraries¶
|LibXML2||XML parser developed for the Gnome project. Implements the
|LibYAML||YAML parser and emitter library. Implements the
|zlib||Lossless data compression library. Implements the
|LLVM||Target-independent code generator and optimizer. Implements the
||Apache v2 with LLVM exceptions|
In addition to the core runtime dependencies, these libraries are needed to build the Crystal compiler.
|LLVM||See above.||Apache v2 with LLVM exceptions|
|libffi||Foreign function interface. Used for implementing binary interfaces in the interpreter. May be disabled with the