Releases: starkware-libs/cairo
Releases · starkware-libs/cairo
v2.10.0-rc.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
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-rc.0
v2.9.2
What's Changed
- Additional documentation in the corelib.
- Circuit's u384 Serde.
- More efficient
array.get(0)
by const folding. - Bug fixes and name changes for new
cairo-execute
feature.- Option for args to be provided as a file.
- Fixed cases of dictionary usage.
- Minor byte-array optimizations.
- Fixed bug with bad types of
const
items.
Full Changelog: v2.9.1...v2.9.2
v2.9.1
What's Changed
- LS: Disable proc macro support by default by. #6768
- LS: Fix corelib test diagnostic with proc macro server off by default. #6770
Full Changelog: v2.9.0...v2.9.1
v2.9.0
New Features
- Global uses.
use a::b::*
would bring the public context froma::b
into the current context.- Not available for use on crates with edition
v2023_01
.
- Basic closures:
let plus_1 = |x| x + 1;
assert_eq!(plus_1(5), 6);
- Formatter Improvements:
- Sorting of module level items only sorts on subsequent
mod
statements oruse
statements. - Removal of extra unnecessary commas at the end of one line lists.
- Addition of extra comma at the end of multi line lists.
- Sort of internal nodes within
use
items. - Merging of subsequent
use
items. - Fix formatting precedence of for loop parts. #6371
- Formatting long arrays with multiple elements per line.
- Sorting of module level items only sorts on subsequent
- Experimental feature -
#[executable]
attribute, to mark a function for execution generating proofs off-chain. - Experimental feature - Associated type bounds
- requires experimental flag -
associated_item_constraints
- Example:
fn foo<T, S, +Iterator::<T>[Item: S]>(t: T) { ... }
- will enforceDeref
onT
to be available and with associated typeItem
of typeS
.
- requires experimental flag -
const
statements are now allowed within code blocks (not just as a module item).use
of consts and types are no allowed within code blocks.- Support format!("{:x}") notation for hexadecimal formatting by @remybar in #6297
- Implement Zero for u384 by @enitrat in #6329
- Add conescutive math operator diagnostic to the parser. #6392
- Disabled inline macro expansion on parser errors. #6413
- Added analyzer check for enums with starknet::Store with no default. #6459
- Add missing
TupleSplitTupleSize16
impl. inmetaprogramming.cairo
by @feltroidprime in #6500 - Added
Pow
trait and implementations for base numeric types andusize
. #6694 - Added option to allow conflicting paths. #6743
- Added option for renaming a storage variable path. #6758
Bug Fixes
- Made non-copy variable not be forwarded in const folding. #6324
- Allow defining const negative
NonZero
. #6425 - Fixed self-ref type detection. #6455
- Somewhat improved diagnostics location occuring from final solve. #6586
- Solving current inference state prior to finding index traits. #6587
- Fixed issue with consts defined out of order. #6625
- Changed ap-change-only solver to be the linear solver. #6626
- Treating all gas-vars as provided 0 if gas is disabled. #6688
- Handling attributes on members and variants. #6738
- Fixed issue with using a box of const as actual const. #6766
Optimizations
- Match optimization now happens in more complex cases as well.
- Additional cases of const-folding.
- Optimized
BitNot
by BoundedInt. #6416 - Enabled bounded-int
abs
optimization in i128 mul. #6417 - Made signed int add and sub more efficient. #6465
Language Server Updates
- Refresh project on
cairo_project.toml
change, register text document sync on server side. #6316 - Fix duplicated and misplaced diagnostics. #6446
- Add completions of struct members. #6567
- Add "fill struct fields" code action. #6565
- Limit module import completion to visible members. #6566
- Add hovers for path segments. #6649
- Support multi-root-workspaces. #6645
Other
- Remove all instances of inline(always) from corelib by @javra in #6114
- Update README by @Olexandr88 in #6373
- corelib: circuit related utils improvements by @feltroidprime in #6482
- Fix Typos in Documentation Files by @cypherpepe in #6677
- Typo Update readme.md by @mdqst in #6693
- Grammar and Style Improvements by @Madmaxs2 in #6747
New Contributors
- @remybar made their first contribution in #6297
- @Olexandr88 made their first contribution in #6373
- @Oemerbeck made their first contribution in #6400
- @feltroidprime made their first contribution in #6482
- @marcuspang made their first contribution in #6497
- @integraledelebesgue made their first contribution in #6478
- @cypherpepe made their first contribution in #6677
- @Gerson2102 made their first contribution in #6627
- @mdqst made their first contribution in #6693
- @Madmaxs2 made their first contribution in #6747
Full Changelog: v2.8.5...v2.9.0
v2.8.5
v2.9.0-dev.0
Cairo compiler.
v2.8.4
v2.8.2
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
Deref
s 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
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. #6284use 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
- @riyueguang made their first contribution in #6078
Full Changelog: v2.7.1...v2.8.0
v2.7.1
What's Changed
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 hasSerde
andTryInto
. WideMul::wide_mul
can now be used as a method.
Full Changelog: v2.7.0...v2.7.1