Platform Support

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.

Target Description Supported versions Comment
x86_64-darwin x64 macOS
(Intel) 11+
(testing only on 11; expected to work on 10.7+) Platform Support - 图1 tests
Platform Support - 图2 builds
x86_64-linux-gnu x64 Linux kernel 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-musl x64 Linux kernel 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.

Target Description Supported versions Comment
aarch64-darwin Aarch64 macOS
(Apple Silicon) 11+ Platform Support - 图7 tests
Platform Support - 图8 builds
aarch64-linux-gnu Aarch64 Linux GNU libc 2.26+ Platform Support - 图9 tests
Platform Support - 图10 builds
aarch64-linux-musl Aarch64 Linux MUSL libc 1.2+ Platform Support - 图11 tests
Platform Support - 图12 builds
arm-linux-gnueabihf Aarch32 Linux
(hardfloat) GNU libc 2.26+ Platform Support - 图13 tests
Platform Support - 图14 builds
i386-linux-gnu x86 Linux kernel 4.14+, GNU libc 2.26+
(expected to work on kernel 2.6.18+) Platform Support - 图15 tests
Platform Support - 图16 builds
i386-linux-musl x86 Linux kernel 4.14+, MUSL libc 1.2+
(expected to work on kernel 2.6.18+) Platform Support - 图17 tests
Platform Support - 图18 builds
x86_64-openbsd x64 OpenBSD 6+ Platform Support - 图19 tests
Platform Support - 图20 builds
x86_64-freebsd x64 FreeBSD 12+ 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.

Target Description Supported versions Comment
x86_64-windows-msvc x64 Windows (MSVC ) 7+ Platform Support - 图23 tests
Platform Support - 图24 builds
aarch64-linux-android aarch64 Android Bionic C runtime, API level 28+ Platform Support - 图25 tests
Platform Support - 图26 builds
x86_64-unknown-dragonfly x64 DragonFlyBSD Platform Support - 图27 tests
Platform Support - 图28 builds
x86_64-unknown-netbsd x64 NetBSD Platform Support - 图29 tests
Platform Support - 图30 builds
wasm32-unknown-wasi WebAssembly (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.