Releases: software-mansion/scarb
v2.11.3
Welcome to the release notes for Scarb v2.11.3
!
This release:
- Updates Cairo Lint to
v2.11.3
. - Includes a Cairo language server fix.
Cairo Version
This version of Scarb comes with Cairo v2.11.2
.
What's Changed
Full Changelog: v2.11.2...v2.11.3
v2.11.2
Welcome to the release notes for Scarb v2.11.2
!
This release is primarily a Cairo update.
Cairo Version
This version of Scarb comes with Cairo v2.11.2
.
What's Changed
- Bump ring from 0.17.11 to 0.17.13 by @dependabot in #2051
- Update rust edition to 2024 by @maciektr in #2006
- Bump the non-critical group with 7 updates by @dependabot in #2055
- Add (ignored) test case for lock matching some dep requirements only by @maciektr in #2032
- Split nightly crates tests job to build and run steps by @maciektr in #1984
- Represent a package in Proc Macro Server more reliably by @integraledelebesgue in #2042
- Propagate ui verbosity when using scarbcommand in extensions by @maciektr in #1994
- Fix errors on allow with scarb build by @piotmag769 in #2058
- Prepare release
2.11.2
by @maciektr in #2064 - Pin ring to v0.17.11 by @maciektr in #2066
Full Changelog: v2.11.1...v2.11.2
v2.11.1
Welcome to the release notes for Scarb v2.11.1!
This release is primarily a Cairo update.
Cairo Version
This version of Scarb comes with Cairo v2.11.1
.
What's Changed
Full Changelog: v2.11.0...v2.11.1
v2.11.0
Welcome to the release notes for Scarb v2.11.0!
This release brings several new developments and bug fixes.
Bug fixes included in this release:
- The
debug_info
field is omitted during size calculation for contract size warnings. - Warnings are no longer duplicated when compiling contracts for tests.
- Compiler config collection is fixed with regard to
[profile.name.cairo]
and[cairo]
precedence. See[cairo]
section docs for more information. - Contract compilation no longer reports contract names duplicates erroneously, when compiling a package with contract re-exports.
- And more!
Per-crate compiler plugins
Since this release, Cairo compiler plugins apply changes only to packages in a compilation unit that depend on them directly. In contrast to previous releases, plugins are no longer applied to all packages in the compilation unit. This change applies to both built-in compiler plugins and procedural macro packages.
Scarb metadata exposes information about dependency on compiler plugins in dependencies
field of CompilationUnitComponentMetadata
. The plugins are still listed in cairo_plugins
field of CompilationUnitMetadata
.
A Cairo package can re-export a procedural macro from it's dependencies by adding re-export-cairo-plugins = ["dependency_name"]
key to it's [package]
section of the toml manifest.
Cairo Version
This version of Scarb comes with Cairo v2.11.0
.
What's Changed
- Implement per-crate plugin collection by @integraledelebesgue in #1920
- Add helpers to obtain
CrateId
of theCompilationUnit
by @integraledelebesgue in #1970 - Update cairo after 2.10.0 merge by @maciektr in #1995
- Update README roadmap by @maciektr in #2005
- Fix clippy lints after rust update by @maciektr in #2002
- Introduce per-crate plugins to the compilation model by @integraledelebesgue in #1913
- Respect per-crate plugins in Proc Macro Server by @integraledelebesgue in #1921
- Bump the non-critical group with 3 updates by @dependabot in #2010
- fix nightly by @maciektr in #2012
- Deduplicate external contracts by full path by @maciektr in #2001
- Fix npm build by @maciektr in #1991
- Prepare
scarb-proc-macro-server-types
release0.2.0
by @maciektr in #2015 - Update cairo-toolchain-xtasks by @maciektr in #2020
- Prepare
scarb-metadata
release1.14.0
by @maciektr in #2014 - Cairo plugin reexports by @maciektr in #2000
- Fix cairo-test dep missing warning by @maciektr in #1993
- Skip plugin dependencies in
scarb-doc
by @integraledelebesgue in #2033 - add starkup installation method by @DelevoXDG in #2030
- Update test ProjectBuilder default Cairo edition to 2024_07 by @maciektr in #2025
- Ignore
debug_info
when emitting file size warnings for contracts compilation by @DelevoXDG in #2029 - Add test for test target contract compilation with error / warnings by @maciektr in #2027
- Do not report warnings second time, when compiling test target contracts by @maciektr in #2028
- Bump foundry-rs/setup-snfoundry from 3 to 4 by @dependabot in #2034
- Update deps by @maciektr in #2039
- Add link to lint docs by @wawel37 in #2040
- Add docs for execute, prove and verify, update docs by @maciektr in #2036
- Fix compiler config collection with profiles by @maciektr in #2041
- Prepare release
2.11
by @maciektr in #2044
Full Changelog: v2.10.1...v2.11.0
v2.10.1
Welcome to the release notes for Scarb v2.10.1!
This release is primarily a Cairo update.
Cairo Version
This version of Scarb comes with Cairo v2.10.1
.
What's Changed
- feat: ui print doc dir by @FroyaTheHen in #1979
- Treat Cairo plugins as package dependencies by @integraledelebesgue in #1889
- Add plugin discovery utilities to scarb-metadata by @integraledelebesgue in #1890
- Introduce procedural macro repository by @integraledelebesgue in #1919
Full Changelog: v2.10.0...v2.10.1
v2.9.4
This release is only a Cairo update.
Cairo Version
This version of Scarb comes with Cairo v2.9.4
.
Full Changelog: v2.9.3...v2.9.4
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
v2.9.3
This release is only a Cairo update.
Cairo Version
This version of Scarb comes with Cairo v2.9.3
.
Full Changelog: v2.9.2...v2.9.3
v2.10.0-rc.1
Welcome to the release notes for Scarb v2.10.0-rc.1!
This release includes:
scarb execute
command.scarb lint
command.
Cairo Version
This version of Scarb comes with Cairo v2.10.0-rc.1
.
What's Changed
- Skip cairo_project.toml when packaging a package by @maciektr in #1868
- PubGrub resolver by @maciektr in #1453
- Update Cairo by @maciektr in #1870
- Allow cancel-in-progress by @maciektr in #1875
- Fix clippy lints after rust update by @maciektr in #1878
- feat: allow declaring [executable] target by @FroyaTheHen in #1871
- Fix LS links in docs by @Draggu in #1879
- Bump the non-critical group with 7 updates by @dependabot in #1882
- Moved cli frontend of the cairo linter to scarb command by @wawel37 in #1873
- Add contract size limits warnings by @DelevoXDG in #1855
- feat: executable command by @maciektr in #1885
- Change time limit on flock test by @maciektr in #1884
- Fix creating package with snfoundry test runner by @ddoktorski in #1843
- Scarb execute name change, arguments file, error msgs by @maciektr in #1888
- Temporarily default to primitive resolver by @maciektr in #1892
New Contributors
- @ddoktorski made their first contribution in #1843
Full Changelog: https://github.com/software-mansion/scarb/compare/v2.10.0-rc.0..v2.10.0-rc.1
v2.10.0-rc.0
Welcome to the release notes for Scarb v2.10.0-rc.0!
This release brings few developments.
Support for prebuilt procedural macro plugins
Until now, all procedural macros required to be compiled on the user system before being used by Scarb.
This meant that programmers that wanted to depend on a package utilizing a procedural macro had to install Rust compiler (and Cargo) on their computer.
This release brings an opt-in feature, that enables the user to request a pre-compiled procedural macro to be used instead.
For this to be possible, two conditions need to be met:
- The procedural macro package has to be published with the precompiled macros included.
- Usage of the precompiled macro binaries needs to be explicitly allowed in the top-level Scarb toml manifest file.
To include a precompiled macro binaries in your package, you need to place the binary files in target/scarb/cairo-plugin
directory of the package, with names adhering to following convention: {package_name}_v{version}_{target_name}.{dll_extension}
, where target name describes the target OS in Cargo conventions. For publishing, the include
field of the package manifest may be useful, as it can be used to instruct Scarb to include this directory when packaging Scarb package with scarb package
/scarb publish
.
To allow usage of precompiled procedural macros, you need to add a list of package names under allow-prebuilt-plugins
name in the tool.scarb
section of Scarb manifest of the compiled (top-level) package. Note this allow list works recursively, so adding a package names allow usage of precompiled macros in the dependency tree of this package.
[tool.scarb]
allow-prebuilt-plugins = ["snforge_std"]
The prebuilt binaries are used in a best-effort manner - if it's not possible to load a prebuilt binary for any reason, it will attempt to compile the macro source code instead.
Support re-exported contracts in build-external-contracts
field
The build-external-contracts
field now supports building contracts that are re-exported from dependency packages with use of pub use
.
Executable target
Since this release, a new Scarb target has been added - [[target.executable]]
, which can be used to compile into a format accepted by Cairo execute. Dependency on cairo_execute
package is required, to provide the #[executable]
attribute.
Cairo Version
This version of Scarb comes with Cairo v2.10.0-rc.0
.
What's Changed
- Fix website dead links by @maciektr in #1844
- Use cairo-toolchain-xtasks by @mkaput in #1845
- Add include field to the manifest by @maciektr in #1842
- Bump semver from 1.0.23 to 1.0.24 by @dependabot in #1848
- Fix docs on proc macros by @maciektr in #1850
- Update deps by @maciektr in #1849
- AOT package script by @maciektr in #1836
- feat: executable plugin by @FroyaTheHen in #1839
- feat: compile executable by @FroyaTheHen in #1840
- Support re-exported contracts in build-external by @maciektr in #1773
- Add allowed prebuilts list by @maciektr in #1846
- Load prebuilt macros by @maciektr in #1856
- Bump the non-critical group across 1 directory with 14 updates by @dependabot in #1860
- Bump gix from 0.68.0 to 0.69.1 by @dependabot in #1859
- Bump deno_task_shell from 0.20.2 to 0.20.3 by @dependabot in #1865
- Bump the non-critical group with 3 updates by @dependabot in #1864
- Update Cairo / add missing cairo deps patch by @maciektr in #1862
- Refactor -> move simple resolver to separate mod by @maciektr in #1452
- Add once_map package by @maciektr in #1665
- Use less partitions in Scarb CI by @maciektr in #1869
New Contributors
- @FroyaTheHen made their first contribution in #1839
Full Changelog: v2.9.2...v2.10.0-rc.0