Wednesday, September 2, 2026

F46 Change Proposal Crystal Language (system-wide)

Wiki - https://fedoraproject.org/wiki/Changes/CrystalLanguage his is a proposed Change for Fedora Linux. This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee. == Summary == This proposal introduces official native support for the [[crystal|Crystal programming language]] compiler ({{package|crystal}}), its dependency manager ({{package|shards}}), an automated spec generator ({{package|cr2rpm}}), and standard RPM packaging macros ({{package|crystal-rpm-macros}}) into Fedora Linux. Shard libraries will be packaged following the '''Shard-as-RPM''' model, enabling offline, secure, and reproducible compilation across the distribution. == Owner == * Name: [[User:Renich|Rénich Bon Ćirić]] * Email: renich@woralelandia.com == Detailed Description == Crystal ([https://crystal-lang.org]) 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 <code>%{_datadir}/crystal/shards/<name>-<version></code> (with compatibility links for default releases). * 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 <code>CRYSTAL_PATH="lib:%{crystal_shards_dir}:%{_datadir}/crystal/src"</code>. * Spec generation, license mapping (SPDX), and topological mock build ordering are automated via {{package|cr2rpm}}. * Compiler bootstrapping complies with Fedora's [[Packaging:Guidelines#No_pre-compiled_binaries|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 [https://discussion.fedoraproject.org/t/bringing-crystal-to-fedora-linux/182632 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 {{package|crystal}}, {{package|shards}}, {{package|crystal-rpm-macros}}, and {{package|cr2rpm}}. ** Execute the initial bootstrap build in Koji using a staging side-tag. ** Publish official Crystal packaging guidelines. ** Maintain core ecosystem packages ({{package|ameba}}, {{package|flaw}}, {{package|kemal}}). * 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 ([https://forge.fedoraproject.org/releng/tickets/issues/13511 RelEng Ticket #13511]). * Policies and guidelines: Fedora Packaging Guidelines updated with dedicated Crystal section ([https://discussion.fedoraproject.org/t/draft-guidelines-crystal-packaging-guidelines-changes-crystallanguage/200733 FPC Draft 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: {{package|llvm-devel}}, {{package|gc-devel}}, {{package|pcre2-devel}}, {{package|libffi-devel}}. * Standard library: {{package|openssl-devel}}, {{package|zlib-devel}}, {{package|gmp-devel}}, {{package|libyaml-devel}}, {{package|libxml2-devel}}. * Opt-in/legacy event loop: {{package|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: [https://codeberg.org/renich/crystal-in-fedora/src/branch/master/plan.rst plan.rst] * Packaging Guidelines: [https://codeberg.org/renich/crystal-in-fedora/src/branch/master/guidelines/packaging-crystal.rst packaging-crystal.rst] * Crystal Official Site: [https://crystal-lang.org/ crystal-lang.org] * Upstream Language Repository: [https://github.com/crystal-lang/crystal github.com/crystal-lang/crystal] * Fedora Tooling & Planning Repository: [https://codeberg.org/renich/crystal-in-fedora codeberg.org/renich/crystal-in-fedora] == Release Notes == Fedora now includes official support for the Crystal programming language, including the compiler ({{package|crystal}}), dependency manager ({{package|shards}}), and full RPM packaging macros ({{package|crystal-rpm-macros}}). Developers can build native, high-performance Crystal applications and package shards offline using standard Fedora tooling. Proposal owners: Package and -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-announce@lists.fedoraproject.org To unsubscribe send an email to devel-announce-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new

No comments:

Post a Comment