Skip to content

v2.10.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Feb 08:55
· 7 commits to main since this release

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.10.0!

Cairo Lint

Cairo-lint is a static code analysis tool for the Cairo language, which is now integrated into Scarb!

It can help you improve your code quality and consistency by checking the codebase against a set of predefined rules, called lints.
It can also automatically fix some of the issues found.

To run lint in the current project, just type:

scarb lint

Take a look at Scarb lint documentation for more information.

Scarb Execute / Prove / Verify

It's now possible to use stwo-cairo prover and verifier to prove Cairo programs through Scarb.

To make your program provable, create an executable package

[package]
name = "test_execute"
version = "0.1.0"
edition = "2024_07"

[[target.executable]]

[cairo]
enable-gas = false

[dependencies]
cairo_execute = "2.10.0"
#[executable]
fn main(num: u8) -> u8 {
    num
}

You can then prove it with following commands:

scarb execute
scarb prove --execution_id=1
scarb verify <path_to_proof_json>

You can also check out this guide on Proving Fibonacci with Stwo.

Note: This functionality is still work in progress and it's output not be trusted in real world applications yet.

Pubgrub dependency resolver

Since this release, Scarb will use a more sophisticated dependency version resolver based on the PubGrub algorithm. Version resolution is the process of choosing concrete dependency package versions (e.g. v2.10.0) with respect to dependency version specifications defined by the user (e.g ~2.9.0 & =2.10.0) from all available package versions. This change will make the resolution possible for more complex dependency trees and if it is not possible, it should produce easier to understand errors.

Small improvements

  • You can now use --no-warnings flag to hide Scarb / compiler warnings when working with Scarb.
  • When building docs with scarb doc, pub(crate) items are now treated like private items, thus they are not included in the generated docs. This is motivated by the fact, that those items are not part of the public package API. To include private items in generated docs, please use --document-private-items.

Cairo Version

This version of Scarb comes with Cairo v2.10.0.

What's Changed

New Contributors

Full Changelog: v2.10.0-rc.1...v2.10.0