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_terminatereplacesProcess.on_interrupt. It responds to more termination triggers and passes an instance ofProcess::ExitReasonto the handler block. Thanks @stakach. Concurrency Improvements:
- Backtraces for unhandled exceptions in
spawnare 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
Atomicoperations now receive an optional parameter. New macroAtomic.fenceadds explicit memory barriers.Threadgot anameproperty. 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_extis 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.mvworks across filesystems. Thanks @HertzDevil. - Misc: Added time zone identifier
Etc/UTCas an implicit alias toUTC.Crystal::System::FileDescriptor::Handleis a generic alias.Hash#updateandHash#put_if_absentno 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_CCcompiler config variable. SupportedNO_COLOR,--staticon Windows,--single-moduleand--threadsforevalandspec. Preliminary support for Solaris/illumos landed. New CLI option--frame-pointers.short_referencefor 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
ProcLiterals,asmwith 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
Numberparameter, compile time flagopenbsd6.2got 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) `代码` - 列表 > 引用。你还可以使用@来通知其他用户。