v2.5.0
Read more on post.
Major updates
- Breaking change: starknet::Call::calldata is now a Span. Direct usages relying on it may break.
- The change is required to vastly reduce the costs of using account contracts.
- New edition 2023_11 - introducing
pub
for struct members and module items.- Kudos to @Jinwei1987 for writing the original visibility addition code.
- Use cairofmt::skip in the formatter. #4387
- Added warnings - can be ignored in crate - and won't be affected by dependencies
- Added warning for unhandled error types. #4454
- Added warnings for unused variables. #4457
- Depraction warning for
external(v0)
on impls. #4470 - Added starknet ABI failures as warnings. #4493
- Added abi failure + warning for account contract functions. #4575
- Added warnings for bad embeddable impls. #4796
- Added
unstable
andfeature
attributes and warnings on usage ofunstable
features.- Warning be ignored using
feature("feature_name")
on an expression wrapping the usage. unstable
specifically added forSafeDispatcher
s usage.
- Warning be ignored using
- Experimental feature for negative impls.
- Fixed get_dep_component inline macro. #4742
New Features
- Added
Bits<T>
in num module by @akhercha in #4251 - Added more data for missing method diagnostic. #4405
- Added assert_ne! test macro by @clint419 in #4424
- Adding snapshot forwarding. #4430
- Adding
must_use
annotation for types and functions. - support for match out of order for enums. #4536
- Added
Debug
derive for various corelib types. - support for otherwise pattern in match for enums. #4557
- support for match on true/false in parser and semantic. #4559
- Added Store impl for ByteArray. #4596
- Added while loops.
- Add bool::then_some function by @LucasLvy in #4529
- Add support for match on none felt252 numeric values. #4764
- Added Serde, Store, PartialEq, Debug and Display for NonZero. #4795
- Added PartialOrd for ContractAddress. #4863
Bug fixes
- Fix attribute parsing with only an identifier after. #4407
- Made auto-available traits be prelude based. #4410
- Made contract address calculation deterministic by @enitrat in #4391
- Fixed deploy syscall address registry by @enitrat in #4489
- Avoid
Not a trait.
diagnostic if a diagnostic was already reported. #4477 - Added error for nopanic cycles. #4643
- Added breaking of stack if no longer holding a var as temp. #4777
Optimizations
- Improve Span deserialization. #4595
- Better performance of
is_empty
. #4715 - Add return optimizations - if a value is ready for function return early - it is returned early - reducing many extra writes.
- Pass Call::calldata as a Span. #4620
Others
- Update linear-types.adoc by @Akare123 in #4508
- fix: several links pointing to legacy repository uri by @krauspt in #4568
- Update match-expressions.adoc by @AdventureSeeker987 in #4607
- fix: minor typos by @tudorpintea999 in #4500
New Contributors
- @clint419 made their first contribution in #4378
- @akhercha made their first contribution in #4251
- @dedushky made their first contribution in #4388
- @Akare123 made their first contribution in #4508
- @krauspt made their first contribution in #4568
- @AdventureSeeker987 made their first contribution in #4607
- @tudorpintea999 made their first contribution in #4500
Full Changelog: v2.4.3...v2.5.0