Skip to content

v2.7.0-rc.0

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jun 08:30
· 776 commits to main since this release
cdf8434

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

Major Updates

  • Trait and Impl items (types, constants, and impls):
    • Example usage for types would be Iterator::Item.
    • Example usage for constants would be NumericBounds::MAX (does not exist just yet).
    • Example usage for impls would be IntoIterator::Iterator.
  • SHA256 support.
  • Modulus Circuit Support - allows for efficient calculations of large modular computations without branches.
  • Storage path and pointer concepts.
    • Instead of only being able to access storage in contract and component context - StoragePath StoragePointer are supplied, allowing for functions out of this scope to access these, as well as allowing for recursive definitions of maps and other structures.
  • Added support for access to members of types implementing the Deref and DerefMut traits.

New Features

  • Fixed sized array support for .span() allowing accessing it efficiently as if it was an array.
  • Add flag to enable gas to cairo-test. #5288
  • Added option to print used resources for tests. #5266
  • Added fmt for signed int. #5308
  • feat: Default impls for signed integer types by @milancermak in #5312
  • Added compiler_error! inline macro for external plugin development. #5357
  • Add Copy trait to Call by @delaaxe in #5372
  • Added handling testing option for get-block-hash. #5368
  • Add phantom attribute - making a type unconstructible. #5381
  • Added implementation for / and % for signed integers.
  • feat: checked math traits by @enitrat in #5410
  • Made all generated code have a mapped originating code - basically all diagnostics no longer points to generated files. #5497
  • feat: result ok and err methods by @enitrat in #5565
  • Added multi-pop for span. #5588
  • feat: saturating traits by @enitrat in #5621
  • Updated Index traits and deprecated the old ones. #5674
  • Added core::iter::Iterator and core::iter::IntoIterator traits.
  • Added *Assign ops and Depracated *Eq ops. #5679
  • feat: add PartialOrdSnap impl by @tdelabro in #5723
  • feat: impl Into for Span/Array pair by @tdelabro in #5650
  • Added automatic support for tuples up to size 10 of Copy, Drop, Clone Destruct, Default, 'Debug, Serde, PartialEqandstarknet::Store`.
  • Made list of allowed derives explicit. #5804
  • Added keccak on byte-array. #5877

Bug Fixes

  • Added destructors in cycle detectors. #5335
  • Testing throws an error upon redeployment of the same contract. #5365
  • Preventing box values from being const-folded. #5416
  • Fixed extra gas reduction panic. #5437
  • Fixed loop inside loop issue. #5441
  • Avoid panics in print! and format! macros when missing parens. #5470
  • Made feedback set algorithm not ignore the nodes post cycle. #5539
  • Fix formatting of comments following an indented block. by @gilbens-starkware in #5878

Language Server Updates

  • Code action for unused variable. #5214
  • Show rust doc when hovering over things. #5225
  • Catch query panics when refreshing diagnostics. #5469
  • Fix hover definition lookup logic. #5603
  • Added cairo icon to ensure all .cairo extensions are recognisable by @Utilitycoder in #5665
  • Implement hover definition for variables & params. #5806
  • Show path to item definition parent item in hovers. #5819
  • Provide trait/impl/struct/enum context for item hovers. #5821
  • Run Cairo formatter over item signatures in hover. #5822

New Contributors

Full Changelog: v2.6.4...v2.7.0-rc.0