Skip to content

Releases: starkware-libs/cairo

v2.18.0

20 Apr 12:23
8746d71

Choose a tag to compare

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.

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_variables invocation handling. #9715
  • Removed redundant clone in implicits goto remapping. #9782
  • Avoided clone in lower_expr_desnap by matching LoweredExpr by value. #9712
  • Avoided redundant Rc allocations in reboxing loop. #9706
  • Removed unnecessary Vec allocation in split_structs. #9654
  • Removed redundant clone in store_local calls. #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_drop to reduce hash lookups. #9674

New Contributors

Full Changelog: v2.17.0...v2.18.0

v2.18.0-rc.0

15 Apr 14:58

Choose a tag to compare

Cairo compiler.

v2.17.0

07 Apr 11:08
eade72a

Choose a tag to compare

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

24 Mar 09:50
88fd4e9

Choose a tag to compare

Cairo compiler.

v2.17.0-rc.3

23 Mar 09:20
a7afa0b

Choose a tag to compare

Cairo compiler.

v2.17.0-rc.2

15 Mar 10:20
8214d48

Choose a tag to compare

Cairo compiler.

v2.16.1

11 Mar 08:22
e702c18

Choose a tag to compare

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

08 Mar 13:34

Choose a tag to compare

Cairo compiler.

v2.17.0-rc.0

17 Feb 10:21
9b4d089

Choose a tag to compare

Cairo compiler.

v2.16.0

17 Feb 09:21
6a43d7c

Choose a tag to compare

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 ClosureInGlobalScope diagnostics. #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::combine implementation. #9552
  • Replaced maps enumerating all statements with Vecs. #9545
  • Reduced many map actions by refactoring CostOps. #9536
  • Made ApplyApChange inplace. #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 self of 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

Full Changelog: v2.15.0...v2.16.0