New Crystal Release: Announced with several new features and bug fixes. Pre-built packages available on GitHub Releases and official distribution channels. See crystal-lang.org/install for instructions.
- Stats: Includes 142 changes since 1.11.2 by 14 contributors.
- Breaking Changes: Respect alignments above
alignof(Void*)
inside union values. This is an ABI breaking change. Most users won't be affected. Thanks @HertzDevil. - Process Termination Handler:
Process.on_terminate
replacesProcess.on_interrupt
. It responds to more termination triggers and passes an instance ofProcess::ExitReason
to the handler block. Thanks @stakach. Concurrency Improvements:
- Backtraces for unhandled exceptions in
spawn
are printed once in multi-threading mode. - It's now possible to disable blocking mode when opening a
File
. - Some issues with atomics and locks were fixed and
Atomic
operations now receive an optional parameter. New macroAtomic.fence
adds explicit memory barriers.Thread
got aname
property. Init schedulers before spawning fibers and use per-scheduler stack pools. Thanks @ysbaddaden, @jgaskins.
- Backtraces for unhandled exceptions in
- Libraries: Enabled support for OpenSSL 3.2 by fixing a bug. Our own LLVM extension library
libllvm_ext
is no longer required when linking LLVM >= 18. Thanks @ysbaddaden, @HertzDevil. - Numeric: Added
BigRational#%
,#tdiv
,#remainder
. Thanks @HertzDevil. - Operators with
=
suffix: Operators ending with=
can now receive multiple parameters and blocks and are properly forwarded by thedelegate
. The operator#[]=
can be called with a block using method syntax. Thanks @HertzDevil. - Windows progress: Handled invalid parameter error in MSVC calls, installed system dependencies in the Windows GUI installer, automatically detected MSVC tools on Windows interpreter, supported
@[Link]
's DLL search order in the interpreter, reserved stack space on non-main threads for crash recovery, andFileUtils.mv
works across filesystems. Thanks @HertzDevil. - Misc: Added time zone identifier
Etc/UTC
as an implicit alias toUTC
.Crystal::System::FileDescriptor::Handle
is a generic alias.Hash#update
andHash#put_if_absent
no longer put duplicate keys. New methodSignal#trap_handler?
. Added macro methods to several AST node types. Thanks @femto, @straight-shoota, @HertzDevil. - Compiler: Added
CRYSTAL_CONFIG_CC
compiler config variable. SupportedNO_COLOR
,--static
on Windows,--single-module
and--threads
foreval
andspec
. Preliminary support for Solaris/illumos landed. New CLI option--frame-pointers
.short_reference
for top-level macros was changed. Thanks @straight-shoota, @HertzDevil, @refi64, @femto. - Compiler Dependencies: Managed with
shards
. The source code inlib/
stays vendored. Only used for updating dependencies. Thanks @straight-shoota. crystal tool flags
: A new compiler tool that prints all values passed to calls to macroflag?
. Thanks @straight-shoota.- Formatter Enhancements: Improved formatter for
ProcLiteral
s,asm
with comments, white space ina.[b]
syntax, calls without parentheses followed by doc comment, and whitespace infoo ()
. Thanks @HertzDevil, @straight-shoota. - Shards 0.18.0: Bundled shards release updated. Brought enhancements for Windows support, such as more cache directories, detection of symlink creation capability, and more improvements on internal tooling. Starting with this release, shards' output is only colored if stdout is a TTY. Thanks @HertzDevil, @straight-shoota.
- Experimental:
ReferenceStorage
: Improved implementation with no compatibility issues. Represents a static buffer for a reference allocation. These APIs are still experimental. Thanks @HertzDevil. - Deprecations: Setter methods for timeouts with
Number
parameter, compile time flagopenbsd6.2
got removed, and the spec runner's state moved intoSpec::CLI
. - Thanks: Thanks to 84codes and every other sponsor. Reach out to crystal@manas.tech for sponsorship or other support.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。