github starkware-libs/cairo v2.11.0

latest releases: v2.12.2, v2.12.1, v2.12.0...
6 months ago

New Features

  • Added option for gas disabling cfg. #6916
  • Allowed use of variants. Allows for matching over a short name and variant construction on the short name.
  • Added const evaluation.
    • Allows for defining const fns and calling these when defining constants or defining other const fns.
  • Finding @T impls near T definition. #7024
  • When not finding methods - compiler now suggests the missing trait.
  • Support for return and ? from inside loops.
  • Added support for using the methods of Deref::Target of a type - not just members.
  • inferring closures types within higher order functions. #7091
  • Added validations that starknet storage members are valid.
  • Printing the missed token in parser diag. #7296
  • implemented iterable squashed felt252 dict - available only for testing. #7289
  • Added support for starknet consts (ContractAddress and ClassHash). #7301

Corelib Additions

Bug Fixes

  • added validation for generic params of impl functions. #6934
  • Making _ still fully lower the relevant variable. #6984
  • Closure works in all non-generic contexts and in most generic contexts.
  • Prevent implementation of disallowed traits such as Felt252DictValue, and NumericLiteral.
  • Made all basic derives be based on members. #7321

Optimizations

  • Reduce gas usage of pow by about 15 percent. #7013
  • Made the panic functions #[inline(never)] to reduce code size. #7385
  • Added panic_with_const_felt252 function and using it where possible to reduce code size. #7386

Formatter Updates

  • Treat super and crate as top_level in use merge. #6908
  • Changed default to sort uses and mods.
  • Removing more unrequired :: in formatter. #7020

New Contributors

Full Changelog: v2.10.1...v2.11.0

Don't miss a new cairo release

NewReleases is sending notifications on new releases.