github starkware-libs/cairo v2.13.0

21 hours ago

Major Features

  • Added item level inline macros.
  • Support for more complex match, if let and while let
    • Includes recursive variants, structs, tuples, and numeric values.
  • Added ByteSpan in corelib.

Breaking Changes

  • Global impls
    • impls defined near the type are always considered when solving an impl - even if the type doesn't exist.
  • Made Iterator::fold be consuming. #8214
  • Made let x = y; move non-copy y. #8521
  • Changed bytearray pending word into Byte31Index. #8516
    • Should only affect users that use old edition and accessed the internal fields of ByteArray.

Bug Fixes

  • Handling zero-sized generics. #7990
  • Properly recognising when a closure is not fully concrete. #7987
  • Const-folded pop from empty arrays and spans keep the expected var. by @orizi in #8117
  • Fix const reported as unused. #8139
  • Added dignostics for having a starkware interface with a body. #8216
  • Block tail expressions fully process attributes. #8257
  • disallow named arguments in closures. #8278
  • Not generating expressions of deref if not found. #8295
  • added is_zero functions to extern consts list. #8360
  • add diagnostic when use star causes cycles. #8463
  • Expose Sum and Product traits. #8542

Other new features

  • Add Nullable::deref_or_else. #8026
  • feat(semantic): support allow(unused_variables) by @giladchase in #8289
  • added inference for negative impls. #8339
  • Implemented sub_pointers for Option. #8525
  • Added support for override file location using path. by @orizi in #8557

Optimizations

Compiler runtime

  • Less green lookups + string manip - direct usage of file content. #7966
  • Made get_submodule query based instead of iteration based. #7980
  • Removed location fetching when get_dummy_program_for_size_estimation. #7982
  • Refactored Maps from CostTokenType to be defined once. #8021
  • Changed CostTokenMap type to vec-map. #8023
  • Creating metadata only once. #8019
  • Updated salsa version.

Gas usage

  • Improved ByteArray iteration.
  • Improved ByteArray manipulation.
  • Compute ByteArray sha256 via iterator. #8540

Code size

  • Added common-expression-elimination optimization. #8217
  • Const folding of matching on snapshots. #8377
  • Using unwrap_syscall instead of simple unwrap where possible. #8561

New Contributors

Full Changelog: v2.12.3...v2.13.0

Don't miss a new cairo release

NewReleases is sending notifications on new releases.