Crystal Platform Support

The Crystal compiler runs on, and compiles to, a great number of platforms, though not all platforms are equally supported. Crystal’s support levels are organized into three tiers, each with a different set of guarantees.

Platforms are identified by their “target triple” which is the string to inform the compiler what kind of output should be produced. The columns below indicate whether the corresponding component works on the specified platform.


Tier 1

Tier 1 platforms can be thought of as “guaranteed to work”. Specifically they will each satisfy the following requirements:

  • Official binary releases are provided for the platform.
  • Automated testing is set up to run tests for the platform.
  • Documentation for how to use and how to build the platform is available.

Only maintained operating system versions are fully supported. Obsolete versions are not guaranteed to work and drop into Tier 2.

TargetDescriptionSupported versionsComment
x86_64-darwinx64 macOS
(Intel)
11+
(testing only on 11; expected to work on 10.7+)
Platform Support - 图1 tests
Platform Support - 图2 builds
x86_64-linux-gnux64 Linuxkernel 4.14+, GNU libc 2.26+
(expected to work on kernel 2.6.18+)
Platform Support - 图3 tests
Platform Support - 图4 builds
x86_64-linux-muslx64 Linuxkernel 4.14+, MUSL libc 1.2+
(expected to work on kernel 2.6.18+)
Platform Support - 图5 tests
Platform Support - 图6 builds

Tier 2

Tier 2 platforms can be thought of as “expected to work”.

The requirements for Tier 1 may be partially fulfilled, but are lacking in some way that prevents a solid gurantee. Details are described in the Comment column.

TargetDescriptionSupported versionsComment
aarch64-darwinAarch64 macOS
(Apple Silicon)
11+Platform Support - 图7 tests
Platform Support - 图8 builds
aarch64-linux-gnuAarch64 LinuxGNU libc 2.26+Platform Support - 图9 tests
Platform Support - 图10 builds
aarch64-linux-muslAarch64 LinuxMUSL libc 1.2+Platform Support - 图11 tests
Platform Support - 图12 builds
arm-linux-gnueabihfAarch32 Linux
(hardfloat)
GNU libc 2.26+Platform Support - 图13 tests
Platform Support - 图14 builds
i386-linux-gnux86 Linuxkernel 4.14+, GNU libc 2.26+
(expected to work on kernel 2.6.18+)
Platform Support - 图15 tests
Platform Support - 图16 builds
i386-linux-muslx86 Linuxkernel 4.14+, MUSL libc 1.2+
(expected to work on kernel 2.6.18+)
Platform Support - 图17 tests
Platform Support - 图18 builds
x86_64-openbsdx64 OpenBSD6+Platform Support - 图19 tests
Platform Support - 图20 builds
x86_64-freebsdx64 FreeBSD12+Platform Support - 图21 tests
Platform Support - 图22 builds

Tier 3

Tier 3 platforms can be thought of as “partially works”.

The Crystal codebase has support for these platforms, but there are some major limitations. Most typically, some parts of the standard library are not supported completely.

TargetDescriptionSupported versionsComment
x86_64-windows-msvcx64 Windows (MSVC )7+Platform Support - 图23 tests
Platform Support - 图24 builds
aarch64-linux-androidaarch64 AndroidBionic C runtime, API level 28+Platform Support - 图25 tests
Platform Support - 图26 builds
x86_64-unknown-dragonflyx64 DragonFlyBSDPlatform Support - 图27 tests
Platform Support - 图28 builds
x86_64-unknown-netbsdx64 NetBSDPlatform Support - 图29 tests
Platform Support - 图30 builds
wasm32-unknown-wasiWebAssembly (WASI libc)Wasmtime 2+Platform Support - 图31 tests

Legend

  • Platform Support - 图32 means automated tests or builds are not available
  • Platform Support - 图33 means automated tests or builds are available
  • Platform Support - 图34 means automated test are available, but the implementation is incomplete

Note

Big thanks go to the Rust team for putting together such a clear document on Rust’s platform support that we used as insipration for ours.