Summary
This proposal introduces official native support for the Crystal programming language compiler (source package , producing binary
crystal-lang), its dependency manager (
crystal), an automated spec generator (
shards), and standard RPM packaging macros (
cr2rpm) into Fedora Linux. Shard libraries will be packaged following the Shard-as-RPM model, enabling offline, secure, and reproducible compilation across the distribution.
crystal-rpm-macros
Owner
- Name: Rénich Bon Ćirić
- Email: renich@woralelandia.com
Current status
- Targeted release: Fedora Linux 46
- Last updated: 2026-10-13
- Announced
- Discussion post poll
- FESCo issue: #3690
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Crystal ([1]) is a statically typed compiled language designed for developer productivity and systems-level execution performance.
The Fedora implementation uses the Shard-as-RPM model:
- Each shard library is packaged as an independent RPM package installing source trees to
%{_datadir}/crystal/shards/<name>-<version>. - Parallel coexistence of multiple shard versions is supported without filesystem collisions, enabling applications to build against specific SemVer versions.
- Network access during package builds is prohibited; dependencies are provided locally by installed RPMs.
- The compiler discovers installed shard libraries offline via
CRYSTAL_PATH="lib:%{crystal_shards_dir}:%{_datadir}/crystal/src". - Spec generation, license mapping (SPDX), and topological mock build ordering are automated via
.
cr2rpm - Compiler bootstrapping complies with Fedora's No Pre-compiled Binaries Policy via a standard transient Koji side-tag bootstrap.
Feedback
Community feedback and architectural planning have been discussed on Fedora Discussion at Bringing Crystal to Fedora Linux.
Benefit to Fedora
- Air-Gapped & High-Security Deployments: Enables building and deploying Crystal software in isolated or air-gapped environments without external internet access or dynamic Git downloads.
- Supply Chain Integrity: Protects against upstream Git repository tampering, branch deletion, and dependency confusion by anchoring all dependencies to cryptographic RPM package checksums.
- Centralized Security Auditing & Patching: System administrators and security scanners (OpenSCAP, DNF, RPM) can track, audit, and patch Crystal libraries system-wide without inspecting ad-hoc vendor directories.
- Hermetic & Reproducible Builds: Conforms strictly with Fedora release engineering standards, ensuring deterministic builds in Koji and Mock.
- Modern Systems Language: Provides a high-performance compiled language with native LLVM optimization, green threads concurrency, and seamless C ABI interoperability.
Scope
- Proposal owners:
- Package and maintain
(producing
crystal-lang),
crystal,
shards, and
crystal-rpm-macros.
cr2rpm - Execute the initial bootstrap build in Koji using a staging side-tag.
- Publish official Crystal packaging guidelines.
- Maintain core ecosystem packages (
,
ameba,
flaw).
crystal-kemal
- Package and maintain
- Other developers: No direct impact on existing packages. Developers can begin packaging Crystal applications and shard libraries.
- Release engineering: Coordinate initial bootstrap build and provide a staging side-tag if required (RelEng Ticket #13511).
- Policies and guidelines: Fedora Packaging Guidelines updated with dedicated Crystal section (FPC PR #1568, FPC Issue #1567, Discussion #200733).
- Trademark approval: N/A (not needed for this Change)
- Alignment with the Fedora Strategy: Expands Fedora's ecosystem of modern, memory-efficient compiled systems languages.
Upgrade/compatibility impact
No impact on existing packages or system upgrades. This change introduces new packages and does not modify existing system defaults or libraries.
How To Test
Hardware/Environment Requirements
Standard x86_64 or aarch64 Fedora Linux system (or Mock chroot).
System Preparation
sudo dnf install crystal shards cr2rpm crystal-rpm-macros
Verification Steps
Generate a spec file from a shard repository:
cr2rpm generate --path ./my-shard
Analyze dependency tree and build order:
cr2rpm deps --path ./my-shard --format mock
Build and verify an application binary:
crystal build --release -o hello src/hello.cr ./hello
Run package tests in an isolated mock chroot:
mock -r fedora-rawhide-x86_64 rebuild my-package.src.rpm
User Experience
Fedora users and developers can install the Crystal compiler and shards package manager directly via standard package management:
sudo dnf install crystal shards
Crystal binaries compile with full Fedora hardening flags (PIE, Full RELRO, Stack Protection) and integrate with GDB and LLDB out of the box.
Dependencies
- Compiler runtime:
,
llvm-devel,
gc-devel,
pcre2-devel.
libffi-devel - Standard library:
,
openssl-devel,
zlib-devel,
gmp-devel,
libyaml-devel.
libxml2-devel - Opt-in/legacy event loop:
.
libevent-devel
Contingency Plan
- Contingency mechanism: Retarget for Fedora N+1. Crystal packages remain available via Copr and staging repos.
- Contingency deadline: Beta freeze.
- Blocks release? No.
Documentation
- Implementation Plan: plan.rst
- Official Packaging Guidelines Pull Request: FPC PR #1568
- Packaging Guidelines (RST): packaging-crystal.rst
- Packaging Guidelines Draft (AsciiDoc): Crystal.adoc
- Fedora Crystal SIG Wiki: SIGs/Crystal
- Crystal Official Site: crystal-lang.org
- Upstream Language Repository: github.com/crystal-lang/crystal
- Fedora Tooling & Planning Repository: codeberg.org/renich/crystal-in-fedora
- Fedora Crystal Packaging Organization: codeberg.org/fedora-crystal
Release Notes
Fedora now includes official support for the Crystal programming language, including the compiler (source package , producing binary
crystal-lang), dependency manager (
crystal), and full RPM packaging macros (
shards). Developers can build native, high-performance Crystal applications and package shards offline using standard Fedora tooling.
crystal-rpm-macros
