Releases: starkware-libs/cairo
v2.18.0
New Features
-
Added forwarding option for Starknet interfaces. #9847
Auto-generated forwarding impls can now be created for Starknet interfaces. This makes it easy to include interfaces declared in other contracts by forwarding the library calls. -
Extensive macro system diagnostics improvements. #9842 #9844
#9845 #9846
The macro system received several improvements in robustness and diagnostics:- Parser now emits E1031 when a macro repetition group
$(...)is missing its required?,+, or*operator. - Macro rules with declaration-time errors are now tracked and skipped during expansion, preventing panics on broken rules.
- A no-progress guard prevents infinite loops when repetition patterns match zero tokens.
- Declaration-time diagnostics now validate placeholder usage in expansion patterns: E2198 is emitted when a placeholder is used outside its required repetition depth, and E2199 when placeholders from different repetition contexts are mixed in the same expansion block.
- Parser now emits E1031 when a macro repetition group
Optimizations
Compiler Runtime
- Removed no longer required extra gas-withdraw from Starknet entrypoint wrappers. #9792
- Made apply optimizations trait-based for a unified interface. #9838
- Made less calculations in BigInt and conversions. #9696
- Eliminated redundant clone in
store_variablesinvocation handling. #9715 - Removed redundant clone in implicits goto remapping. #9782
- Avoided clone in
lower_expr_desnapby matchingLoweredExprby value. #9712 - Avoided redundant
Rcallocations in reboxing loop. #9706 - Removed unnecessary Vec allocation in
split_structs. #9654 - Removed redundant clone in
store_localcalls. #9694 - Removed unnecessary vector clone in closure capture. #9691
- Much smaller clones in usages analysis. #9641
- Removed redundant HashMap lookup in SCC algorithm. #9650
- Used Entry API in
add_dropto reduce hash lookups. #9674
New Contributors
Full Changelog: v2.17.0...v2.18.0
v2.18.0-rc.0
Cairo compiler.
v2.17.0
What's Changed
- Bumped sierra version to v1.8.0. #9687
- Upgrade cairo-vm version. #9772
- Make get execution info v3 syscall default. #9775
Full Changelog: v2.16.1...v2.17.0
v2.17.0-rc.4
Cairo compiler.
v2.17.0-rc.3
Cairo compiler.
v2.17.0-rc.2
Cairo compiler.
v2.16.1
Bug Fixes
- Made duplicate variant names not cause compiler crashes.
- #9711 - Fixed slowdown for circuits compilation.
- Made compilation of contracts saved in cached much faster.
Full Changelog: v2.16.0...v2.16.1
v2.16.1-rc.0
Cairo compiler.
v2.17.0-rc.0
Cairo compiler.
v2.16.0
Major Changes
-
Added placeholder error codes for all diagnostics. #9302
-
Contextualized paths for shorter and more readable diagnostics. #9265
Diagnostic messages now show shorter, context-aware paths making errors easier to understand.
- Created a dataflow analysis framework and migrated backward analysis. #9533
Bug Fixes
- Removed intermediate names from event generated code. #9638
- Made formatter keep
;when it causes ambiguity. #9592 - Fixed mishandling of
Self::in impl-const-items. #9562 - Fixed const-impl-item type-diagnostics span. #9561
- Avoided duplicate
ClosureInGlobalScopediagnostics. #9349 - Fixed substorage diagnostic formatting. #9242
- Made internal version dependency fully-fixed. #9313
- Fixed full path for functions in a generic impl. #9267
Optimizations
Compiler Runtime
- Made casm builder build algorithm linear. #9489
- Improved stack-tracking algorithm. #9491
- Vastly reduced the number of clones for building a Sierra program. #9467
- Simplified
GasInfo::combineimplementation. #9552 - Replaced maps enumerating all statements with Vecs. #9545
- Reduced many map actions by refactoring CostOps. #9536
- Made
ApplyApChangeinplace. #9448 - Simplified decompression by using bit alignment of encoding. #9607
- Removed many interim vectors for extern fn processing. #9569
- Made const-folding VarInfo cloning shallow by rc. #9304
Gas Usage
- Optimized sha256 padding code. #9360
- Used iterator and BoundedInt for generating keccak input. #9425
- Reboxing now works recursively and applies optimization at deconstruct statement. #9338
Other Changes
- Added cost-token for blake. #9506
- Allow immediate consumption of
ref selfof temporaries. #9565 - Made single variant matches not create branch align. #9618
- Improved Sierra debug info serde. #9525
- Updated salsa version to 0.25.2. #9280
- Extensive documentation improvements across the reference docs.
New Contributors
- @andrewbig655 made their first contribution in #9163
- @BigTennEd223 made their first contribution in #9169
- @0xlupin made their first contribution in #9193
- @grumi54 made their first contribution in #9178
- @PixelPil0t1 made their first contribution in #9200
- @boqishan made their first contribution in #9212
- @santamasa made their first contribution in #9213
- @lmorett1 made their first contribution in #9238
- @cmende made their first contribution in #9251
- @Aleksandr1732 made their first contribution in #9281
- @esorense made their first contribution in #9286
- @skinnypete65 made their first contribution in #9310
- @JayeTurn made their first contribution in #9325
- @cwhitak3r made their first contribution in #9371
- @MrEeeeet111 made their first contribution in #9502
- @LarryArnault45 made their first contribution in #9546
- @alizfara112 made their first contribution in #9568
- @Evelina331 made their first contribution in #9591
- @MidSage0614 made their first contribution in #9616
Full Changelog: v2.15.0...v2.16.0