Releases: starkware-libs/cairo
Releases · starkware-libs/cairo
v2.11.2
Bug Fixes
- Prevented code containing malformed function params from creating compiler panics.
- Made
unsupported allows
be a warning instead of an error. - Fixed formatter panic issue with sorting usages.
Full Changelog: v2.11.1...v2.11.2
v2.11.1
v2.11.0
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 fn
s and calling these when defining constants or defining otherconst fn
s.
- Allows for defining
- Finding
@T
impls nearT
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
andClassHash
). #7301
Corelib Additions
- OptionTrait::unwrap_or_else by @enitrat in #6913
- Add boolean operators to Result type by @cairolover in #6921
- Impl fmt::debug for Range by @julio4 in #6926
- range is_empty by @julio4 in #6925
- Add
map
toOption
by @cairolover in #6929 - OptionTrait::is_some_and by @julio4 in #6927
- OptionTrait::is_none_or by @julio4 in #6928
- OptionTrait::ok_or_else by @julio4 in #6930
- OptionTrait boolean operators by @julio4 in #6936
- OptionTrait::map_or, OptionTrait::map_or_else by @julio4 in #6935
- Option iterator by @cairolover in #6942
- Add iterator traits to prelude by @cairolover in #6948
- ByteArrayIterator by @julio4 in #6938
- derive PartialEq on Range by @cairoIover in #6970
- Add
map
methods toResult
by @cairolover in #6932 - snapshot fixed-size array iterator by @cairolover in #6944
FnSnapshotImpl
by @julio4 in #6992- Result iterator by @cairolover in #6933
- range contains by @cairoIover in #7008
IntoIterator
doc/tests,iter::traits::collect
module by @julio4 in #6991- Added support for
pow
in constant eval. #6996 - iter::adapters::Map by @julio4 in #6949
- IntoIter for Span-convertible @C by @cairoIover in #6998
- Add support for the
..=
RangeInclusive syntax by @cairoIover in #6972 - FromIteratorTrait by @julio4 in #7018
- OptionTrait::take by @hudem1 in #7073
- Iterator::enumerate by @julio4 in #7048
- Iterator::fold by @MagisterDallis in #7084
- Iterator::advance_by by @MagisterDallis in #7059
- storage vectors iterators by @julio4 in #6941
- core::iter::zip by @julio4 in #7050
- OptionTrait::filter by @hudem1 in #7108
- Iterator::collect by @julio4 in #7086
- ByteArrayFromIterator by @julio4 in #7130
- Iterator::count by @MagisterDallis in #7094
- Felt252DictFromIterator by @julio4 in #7137
- Added None & Some to prelude. #7154
- Using Ok,Err,Some,None from prelude. by @orizi in #7157
- Iterator::peekable by @hudem1 in #7097
- Iterator::product by @MagisterDaIlis in #7156
- Iterator::last by @MagisterDaIlis in #7140
- Iterator::Sum by @MagisterDaIlis in #7142
- implemented scrub for Store trait. #7164
- Iterator::find by @julio4 in #7151
- implemented push and pop. #7153
- vec deprecated append. #7167
- iter::adapters::Filter by @julio4 in #7152
- RangeInclusiveTrait by @MagisterDaIlis in #7158
- Iterator::nth by @MagisterDaIlis in #7184
- Add OptionTrait::flatten by @cairolover in #7243
- Extend trait by @julio4 in #7132
- Iterator::take by @cairolover in #7230
- FromIterator takes IntoIterator instead of Iterator by @julio4 in #7226
- feat(corelib): Into<T, Option> by @cairolover in #7244
- Deprecated const libfuncs for starknet types. #7302
- Deprecated direct usages of
core::starknet
orcrate::starknet
. #7304 - core::iter::chain by @hudem1 in #7064
- Added
Iterator::any
andIterator::all
. #7365
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
, andNumericLiteral
. - 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
use
s andmod
s. - Removing more unrequired
::
in formatter. #7020
New Contributors
- @famouswizard made their first contribution in #6914
- @wgyt made their first contribution in #6922
- @detrina made their first contribution in #6931
- @cairolover made their first contribution in #6921
- @julio4 made their first contribution in #6926
- @MarsonKotovi4 made their first contribution in #6918
- @sky-coderay made their first contribution in #6910
- @rben-dev made their first contribution in #6965
- @Fallengirl made their first contribution in #6880
- @cairoIover made their first contribution in #6970
- @Hopium21 made their first contribution in #6911
- @XxAlex74xX made their first contribution in #6997
- @Guayaba221 made their first contribution in #6937
- @augustin-v made their first contribution in #7012
- @Marcofann made their first contribution in #6962
- @dannbbb1 made their first contribution in #7019
- @bouchmann made their first contribution in #7022
- @longxiangqiao made their first contribution in #7028
- @JohnBonny made their first contribution in #7032
- @GooseMatrix made their first contribution in #7030
- @NeoByteXx made their first contribution in #7029
- @Dahka2321 made their first contribution in #6988
- @MagisterDallis made their first contribution in https://github.com/starkw...
v2.10.1
v2.9.4
v2.11.0-dev.2
Cairo compiler.
v2.11.0-dev.1
Cairo compiler.
v2.11.0-dev.0
Cairo compiler.
v2.10.0
This is the Cairo version associated with Starknet 0.13.4. Contracts written with 2.10.0 are not declarable on Starknet until the upgrade.
What's Changed
- Corelib documentation updates.
- implement
cfg
not
,and
andor
. #6802 - Panic when a dependency is misconfigured. #6858
- update error message for missing '0x' prefix by @chen-liang-CN in #6869
- Adding the last line of a multi-line diagnostics. #6850
- Changing the prioritization in output Diagnostics. #6884
- Using correct type on snapshot mismatch. #6902
- Adding redeposit gas by default. #6904
- Refactored bounded_int_trim. #7062
- Added const for starknet types. #6961
New Contributors
- @Danyylka made their first contribution in #6769
- @victorMagdesian made their first contribution in #6790
- @donatik27 made their first contribution in #6834
- @taikoonwang made their first contribution in #6845
- @futreall made their first contribution in #6871
- @vtjl10 made their first contribution in #6870
- @zeevick10 made their first contribution in #6877
- @Daulox92 made their first contribution in #6875
- @Bilogweb3 made their first contribution in #6881
- @jasmyhigh made their first contribution in #6882
- @chen-liang-CN made their first contribution in #6869
- @Pricstas made their first contribution in #6888
Full Changelog: v2.9.2...v2.10.0
v2.9.3
Fixing the old snapshot bug in loops: #7272.
When a generated loop function doesn't take ownership, and several snapshots of the variable exist, the latest may not be the one chosen.
Full Changelog: v2.9.2...v2.9.3