· via Hacker News – Front Page (native)
Crystal 1.22.0 brings native event loops to all targets, SIGPIPE emulation and LLVM 23/24 support
Crystal 1.22.0 ships a native event loop on every target, SIGPIPE-like handling for standard streams, a much faster DWARF parser and support for LLVM 23 and 24.

Crystal 1.22.0 has been released, bringing 251 changes from 33 contributors since version 1.21.1, according to the announcement on crystal-lang.org. The headline items are a native event loop now enabled by default on every supported target, SIGPIPE-style handling for the standard streams, a DWARF parser rewritten for speed, and support for LLVM 23.1 and 24.0.
Native event loops on every target
The runtime now offers a native event loop built directly on the operating system's readiness selector on all targets, and it is the default. According to the release notes, epoll has been enabled on Solaris and kqueue now covers the remaining BSD variants, which had previously relied on the portable fallback. libevent is still available, but it is strictly opt-in, and the team expects to deprecate it in a following release.
Standard streams emulate SIGPIPE
When a write to STDOUT or STDERR fails with EPIPE, the error that occurs once the reading end of a pipe has closed, a Crystal process now exits immediately. That matches the default behaviour of the SIGPIPE signal on Unix systems and makes Crystal programs behave conventionally inside shell pipelines. Previously the failing write raised IO::Error and left an error message behind on exit. Programs that prefer the old behaviour can set STDOUT.exit_on_broken_pipe = false.
A faster DWARF parser
Backtrace decoding relies on DWARF debug information, and this release overhauls that parsing path. The parser now reads sections on demand rather than eagerly, builds an index table once, and caches decoded backtrace lines in a least-recently-used cache, which the announcement says yields dramatically faster lookups with lower memory usage. Support for the DWARF 5 forms DW_FORM_addrx and DW_FORM_strx was also added.
Language, runtime and HTTP changes
Constants can now carry type declarations, for example BAR : Int32 = 1, with numeric literals autocasting to the declared type. Process.fork, deprecated since before 1.0, has finally been removed. Compile-time metaprogramming gains StringLiteral#bytesize, NumberLiteral#chr and CharLiteral support in RangeLiteral#each, while the new Crystal::ALL_FLAGS and Crystal::USER_FLAGS constants expose compile-time flags. In the OpenSSL bindings, Kernel TLS is now enabled by default.
HTTP saw a long list of fixes and hardening. #remote_address and #local_address moved from HTTP::Request to HTTP::Context, HTTP::Headers gained a merge method, and IO::Memory bodies are now serialized with a Content-Length header. Stricter validation rejects unrecognised Transfer-Encoding values, invalid Content-Encoding and malformed trailers. One change is flagged as breaking: the return values of HTTP::Request#body= and #content_length= have been corrected.
Elsewhere in the standard library, File.exists? and File::Info's readable?, writable? and executable? predicates accept a follow_symlinks argument, Time::Span gained to_nanoseconds and related conversions, and backtraces now work when linking with -static-pie on musl-libc.
Platforms, LLVM and compatibility
The aarch64-linux-gnu and aarch64-linux-musl targets moved from Tier 2 to Tier 1. The announcement explains that official builds were the only missing requirement, and those have existed since 1.19. This release is also the first to ship builds for aarch64-windows-msvc.
On the compiler side, LLVM 23.1 and 24.0 are supported, and RFC 30 introduces a forward-compatibility policy for bootstrapping: building Crystal 1.22 requires a stage-0 compiler at version 1.14 or higher.
Why it matters
The switch to native event loops everywhere removes libevent from the default execution path, simplifying the runtime and letting Crystal schedule IO directly on the primitives each operating system provides. The SIGPIPE emulation eliminates a common source of spurious error output in pipelines and aligns the language with long-standing Unix convention. Faster, leaner DWARF parsing improves backtrace generation, which matters for production error reporting where symbolication sits on the hot path. Tier 1 status for aarch64 Linux is a practical win for anyone deploying to ARM servers or containers, and the new forward-compatibility policy gives distributors clearer rules about which compiler can bootstrap which release.
- #crystal-lang
- #programming-languages
- #compilers
- #open-source
- #llvm