v2.10.0
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
- Disable gas cfg when
enable-gas=false
by @DelevoXDG in #1904 - Update
enable-gas
docs by @DelevoXDG in #1905 - Run cargo update by @Arcticae in #1907
- Bump semver from 1.0.24 to 1.0.25 by @dependabot in #1903
- Bump vite from 5.4.6 to 5.4.14 in /website by @dependabot in #1911
- Bump katex from 0.16.10 to 0.16.21 in /website by @dependabot in #1899
- feat: exclude pub(crate) from docs by @FroyaTheHen in #1908
- Fix
scarb execute
outputs by @DelevoXDG in #1918 - docs: update formatting by @FroyaTheHen in #1909
- Update Cairo by @maciektr in #1926
- Rename StarkNet to Starknet by @maciektr in #1932
- Scarb execute: support panic reason print by @maciektr in #1933
- Update cairo-toolchain-xtask by @maciektr in #1934
- Require disabled gas in executable target compilation by @maciektr in #1935
- Add deprecation warning to cairo-run by @maciektr in #1936
- Split scarb-execute into subfiles by @DelevoXDG in #1924
- Add
scarb prove
by @DelevoXDG in #1900 - Update Cairo by @maciektr in #1942
- Add
scarb verify
by @DelevoXDG in #1922 - Bump the non-critical group with 4 updates by @dependabot in #1945
- Adapt release workflow for scarb-prove by @maciektr in #1943
- Executable target: allow syscalls flag by @maciektr in #1941
- Bump openssl from 0.10.69 to 0.10.70 by @dependabot in #1946
- Scarb execute: Support printing resource usage, exit with non-zero code on panic by @maciektr in #1940
- Set execute default output format per target by @maciektr in #1947
- Update stwo_cairo_prover rev, use std feature by @maciektr in #1956
- Allow choosing executable by @maciektr in #1951
- Allow hiding warnings in Scarb output by @DelevoXDG in #1689
- take stwo-prover from stwo-cairo by @ohad-starkware in #1959
- Update asdf usage instructions on the website/download page by @stefanalfbo in #1960
- Upgrade stwo-cairo when building nightly release by @maciektr in #1961
- Bump the non-critical group across 1 directory with 5 updates by @dependabot in #1963
- Distinguish between library and plugin IDs in component dependencies by @integraledelebesgue in #1912
- Docs: Update default value in formatter config by @maciektr in #1965
- Print contract stem in size warning by @maciektr in #1958
- Update dependencies, fix cairo-lint imports by @maciektr in #1968
- Add cairo lint docs by @wawel37 in #1971
- Pubgrub lockfile lookup fix by @maciektr in #1957
- Update docs on profile and cairo in workspace context, change manifest path in warning by @maciektr in #1969
- Faster CI by @maciektr in #1972
- chore: fix some typos by @renshuncui in #1973
- Bump @octokit/request-error from 5.0.1 to 5.1.1 in /website by @dependabot in #1980
- Bump dompurify and mermaid in /website by @dependabot in #1983
- Bump @octokit/request and @octokit/core in /website by @dependabot in #1982
- Bump the non-critical group with 4 updates by @dependabot in #1988
- Update Cairo by @maciektr in #1985
New Contributors
- @ohad-starkware made their first contribution in #1959
- @stefanalfbo made their first contribution in #1960
- @integraledelebesgue made their first contribution in #1912
- @renshuncui made their first contribution in #1973
Full Changelog: v2.10.0-rc.1...v2.10.0