Skip to content

Releases: starkware-libs/cairo

v2.9.0-dev.0

20 Oct 14:18
Compare
Choose a tag to compare

Cairo compiler.

v2.8.4

07 Oct 11:16
f67829f
Compare
Choose a tag to compare

Bug Fixes

  • Fixed self-ref type detection. #6455

Full Changelog: v2.8.2...v2.8.4

v2.8.2

08 Sep 15:08
14b1d8c
Compare
Choose a tag to compare

Note that in order to match Scarb/compiler versions, we skip 2.8.1, which was captured by a Scarb hotfix. Up to urgent bug fixes, the compiler and Scarb are released together.

What's Changed

  • Added TryInto::<u384, {u256,u128}>. #6326
  • Properly printing panics in the cairo runner. #6333
  • Update Builtin costs. #6340
  • Implement Zero for u384. #6329
  • Enrich members caching - made accessing type members through Derefs faster . #6343

Bug Fixs

  • Made sierra generation external stack based, preventing stack overflow in extremely long functions cases. #6303
  • Made non-copy variable not be forwarded in const folding. Fixing const folding dict bug. #6324

Full Changelog: v2.8.0...v2.8.2

v2.8.0

27 Aug 11:36
9322175
Compare
Choose a tag to compare

New Features

  • Added finding unused imports. #6139 #6152
  • Using default implementations for PartialOrd::{gt,le,ge}. #6195
  • Improved diagnostics mappings. #6226 #6227 #6290
  • Added WideSquare trait. #6194
  • Made unreachable code diagnostics from errors into warnings. #6259
  • Don't report diagnostics for missing types. #6269
  • Added range operator support:
    • for x in 0..6_u8 { ... }
  • Added support for crate:: for path resolution. #6284
    • use crate::path::in::the_crate;

Bug Fixes

  • fixed loop capture of snapshoted variables. #5934
  • Dedupping parser diagnostics on file ids. #6212
  • Prevented panic on unexpected generic args for methods. #6217
  • Removed faulty diagnostic on inlining over generated functions. #6257
  • Updated sierra ap-change finding to be based on final lowering. #6258
  • Refactored Vec IndexView so it would be properly implemented. #6282
  • Removed entry-code running steps from resource calculations (on cairo-test's --print_resources). #6281

Language Server Updates

  • Faster reaction time to changes.
  • Allows getting the macro generated code pointed to by diagnostics. #6276
  • Add a command to inspect analyzed crates. #5987
  • Add support for getting struct members doc. #6145
  • Add notification on corelib mismatch. #6213
  • Look for unmanaged core in Scarb. #6248
  • Cancellation support. #6263
  • Fix hover on definition. #6255

New Contributors

Full Changelog: v2.7.1...v2.8.0

v2.7.1

13 Aug 11:31
964a02d
Compare
Choose a tag to compare

What's Changed

  • Bumped VM version. #6198
  • Added corelib version validation when loading db. #6204

Language Server Updates

  • Removed db panics - a lot less LS crashes.
  • Prevented diagnostics updates from happening in the same time - causing a smoother LS run.
  • Not adding use statements for items already in prelude.

New Features

  • Circuit's u96 now has Serde and TryInto.
  • WideMul::wide_mul can now be used as a method.

Full Changelog: v2.7.0...v2.7.1

v2.7.0

01 Aug 07:31
223ca99
Compare
Choose a tag to compare

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
  • For loops full support - on any type implementing IntoIterator trait.
  • Require destruct instead of drop for unwrapping. #5902
  • Added Default for Option. #5920
  • Allow for implicit impls for impl impl items. #5915
  • Add 2024_07 edition. #5923
    • Vastly reducing the amount of items in the prelude.
    • Not auto adding pub for starknet storage members.
  • Better diagnostics for types missing :: in expression context. #5926
  • Vastly reduce diagnostics that are less useful when others appear. #5930
  • Add compiler flag to disable non-always inlining by @javra in #5911
  • Faster tests when not in profiling mode. #6014
  • Added WideMul and Sqrt traits. #6017
  • Added diagnostics for conflicting storage members.
  • Added core::num::traits::Bounded. #6063

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
  • Fixing formatting of long unsplittable words. #5906
  • Fixed issue #5967 . #5968
  • Added storage Vec. #5974
  • Filtering duplicated diagnostics. #6001
  • Added support for tuple auto implementations for up to size 15. #6013
  • Fixed generic parameters cycle detection. #6094

Deprecations

  • Deprecation warning for consteval_int!. #6019
  • Deprecation warning for most direct integer libfuncs (use the relevant trait instead).
  • Updated Index traits and deprecated the old ones. #5674
  • Added *Assign ops and Depracated *Eq ops. #5679
  • Added core::integer::BoundedInt trait. #6064

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
  • Added documentation for inline macros.

New Contributors

Full Changelog: v2.6.4...v2.7.0

v2.7.0-rc.3

16 Jul 14:02
bd44f91
Compare
Choose a tag to compare

New Features

  • Faster tests when not in profiling mode. #6014
  • Added WideMul and Sqrt traits. #6017

Deprecations

  • Deprecation warning for consteval_int!. #6019
  • Deprecation warning for most direct integer libfuncs (use the relevant trait instead).

Full Changelog: v2.7.0-rc.2...v2.7.0-rc.3

v2.7.0-rc.2

11 Jul 11:30
8d1bef4
Compare
Choose a tag to compare

New Features

  • Added storage Vec. #5974
  • Filtering duplicated diagnostics. #6001
  • Added support for tuple auto implementations for up to size 15. #6013

Full Changelog: v2.7.0-rc.1...v2.7.0-rc.2

v2.7.0-rc.1

07 Jul 11:08
1af57c9
Compare
Choose a tag to compare

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.

New Features

  • For loops full support - on any type implementing IntoIterator trait.
  • Require destruct instead of drop for unwrapping. #5902
  • Added Default for Option. #5920
  • Allow for implicit impls for impl impl items. #5915
  • Add 2024_07 edition. #5923
    • Vastly reducing the amount of items in the prelude.
    • Not auto adding pub for starknet storage members.
  • Better diagnostics for types missing :: in expression context. #5926
  • Vastly reduce diagnostics that are less useful when others appear. #5930
  • Add compiler flag to disable non-always inlining by @javra in #5911

Bug Fixes

  • Fixing formatting of long unsplittable words. #5906
  • Fixed issue #5967 . #5968

Language Server Updates

Added documentation for inline macros.

New Contributors

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

v2.7.0-rc.0

26 Jun 08:30
cdf8434
Compare
Choose a tag to compare

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