Crystal 1.21.0 ships execution contexts enabled by default, bringing multi-threading support via RFC 0002. The default context is single-threaded but can be resized for parallelism. Key breaking changes include fibers no longer being pinned to one thread and removal of same_thread: spawn support in parallel contexts. New language features include %W string array literals with interpolation and splats. Standard library additions cover Channel(T) implementing Iterator(T), synchronous HTTP::WebSocket#receive, JSON::Field nested root properties, UUID v6/v8 generators, Socket#sendfile for efficient file transfer, and chainable spec matchers. The compiler improves case expression type narrowing and debug metadata. Legacy PCRE fallback is disabled and the original crystal(1) manpage is removed in favor of split subcommand pages.

6m read timeFrom crystal-lang.org
Post cover image
Table of contents
HighlightsStatsChanges
42.1K Impressions