github starkware-libs/cairo v2.6.0

latest releases: v2.12.4-dev.0, v2.12.3, v2.12.2...
18 months ago

This is the Cairo version associated with Starknet 0.13.1. Contracts written with 2.6.0 are not declarable on Starknet until the upgrade.

Major Updates

  • Added support for gas coupons.
    • Gas coupons are a way to pay for calling a function, in a different place then the actual function call.
    • Allows support for recursive destructs (as we can hold such a coupon for the recursive destruct call in the recursive object).
    • Only available with experimental flags.
  • Support for complex consts (Non-Zero, struct, enum).
  • More aggressive function inlining heuristics.

New Feautres

  • Better manual gas handling - if gas is handled manually - gas withdrawal is not automatically added. #4880
  • Added if-let expression support.
  • Added support for underscore pattern in match on tuples. #4996
  • Add cmp::minmax function by @delaaxe in #4981
  • Added while let support.
  • Add remaining assert_xx! comparison test macros by @iamvukasin in #4936
  • Add TryInto<u512, u256> by @delaaxe in #5031
  • feat: add num::traits::ops::OverflowingAdd trait by @enitrat in #4988
  • feat: OverflowingSub trait by @enitrat in #5164
  • feat: OverflowingMul trait by @enitrat in #5172
  • feat: wrapping traits by @enitrat in #5175
  • Fixed array support [1, 4, 5] of type [felt252; 3].
    • No support for conversion into a span for Index access yet, basically equivalent to (felt252, felt252, felt252) for the time being.

Optimizations

  • Improved performance for ecdsa. #4985
  • Add split_structs optimization - preventing carry of full structs merges due to partial changes. #5034
  • Add scrub units optimization.

Bug Fixes

  • if let inside loops properly works. #5016
  • Fix bug in local variables aliasing. #5028
  • Fixed struct formatting. Closing issue #5032. #5062
  • Fix enable ap tracking detection bug. #5073
  • fix: enum store derive by @enitrat in #5191

Other updates

New Contributors

Full Changelog: v2.5.4...v2.6.0

Don't miss a new cairo release

NewReleases is sending notifications on new releases.