Releases: software-mansion/scarb
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
v2.9.2
Welcome to the release notes for Scarb v2.9.2
!
This release is primarily a Cairo update.
New developments included
- Fix displaying labels of linked items in doc - Since this release, both
[label](path)
and[path]
format of cross item links can be used in Scarb doc. - Fix component dependencies resolution - Fix an edge case where some transient dev dependencies has been included in some component dependencies unnecessarily.
Cairo Version
This version of Scarb comes with Cairo v2.9.2
.
What's Changed
- Explicitly set rust-version for cairo-lang-macro crate by @maciektr in #1787
- fix: bump bytes to 1.9.0 by @chenrui333 in #1792
- Bump the non-critical group with 6 updates by @dependabot in #1798
- Bump deno_task_shell from 0.18.1 to 0.20.2 by @maciektr in #1800
- Bump slackapi/slack-github-action from 1.27.0 to 2.0.0 by @dependabot in #1794
- Fix label displaying in case 2 part linakge in scarb doc by @wawel37 in #1803
- Add linkage docs to scarb doc by @wawel37 in #1802
- Use new ls package by @wawel37 in #1804
- Disable caching for setup-scarb in Scarb CI by @maciektr in #1807
- Update README by @maciektr in #1816
- Bump the non-critical group with 7 updates by @dependabot in #1819
- Make unstable* flags warning more explicit by @maciektr in #1822
- Use patch-based Cairo dependencies specification by @mkaput in #1818
- Bump nanoid from 3.3.7 to 3.3.8 in /website by @dependabot in #1837
- Refactor: pull CU dependencies directly from dependency graph by @maciektr in #1820
New Contributors
- @chenrui333 made their first contribution in #1792
Full Changelog: v2.9.1...v2.9.2
v2.9.1
Welcome to the release notes for Scarb v2.9.1!
This release includes several new developments and fixes.
-
Interface changes
- Allow ignoring Cairo version checks - Version requirements defined in
cairo-version
fields in package manifests can be ignored with new--ignore-cairo-version
flag. - Add redeposit gas flag - Compiler config now includes
add_redeposit_gas
flag.
- Allow ignoring Cairo version checks - Version requirements defined in
-
Compilation model changes
- Component dependencies in Scarb metadata - Scarb metadata includes information about dependencies of each component in a compilation unit.
- Integration tests features - Integration tests should be compiled with the same feature set, as the main package.
- Disallow imports by target name in integration tests - Integration tests cannot rely on test target name to reference self in imports and should use
use crate::(...)
instead.
-
Warnings and diagnostics
- Edition unset warnings - Warnings are emitted for all loaded packages with no edition set in package manifest.
- Warnings from dependencies silenced when building tests - Warnings originating in package dependencies are silenced when building package tests.
-
Bug fixes
- Fix registry client cache file - Simultaneous access to a registry client cache file could result in interrupted downloads due to a race condition, fixed with advisory lock.
-
Procedural macros changes
- Packaging procedural macros - Packages implementing procedural macros (with
[cairo-plugin]
target) can now be packaged withscarb package
and published withscarb publish
. - Inline procedural macro arguments - Inline procedural macros defined with Scarb do not get function name as part of the arguments token stream - only the associated arguments list (with delimiters).
- Fix check command for procedural macros - Scarb check now properly builds all procedural macros required by the package.
- Packaging procedural macros - Packages implementing procedural macros (with
-
New Scarb doc features
- Reexported modules documentation support - Documentation generated with
scarb doc
now includes docs of modules reexported from the package. - Cross item linkeage support - Generated project documentation now resolves item references with
[some::cairo::path]
syntax, as clickable links. - Struct members signature - Documentation of structs, generated with
scarb doc
now includes struct's members signatures. - Diagnostics when generating documentation - If generating documentation of a package fails due to invalid Cairo code, Scarb should exit gracefully while showing compiler diagnostics instead of panicking.
- Hiding docs of impls of hidden traits - Impls of traits hidden with
doc(hidden)
attributes are skipped when generating documentation withscarb doc
. - Corelib documentation on Scarb website - Cairo core library documentation is now automatically published on Scarb documentation website with every release.
- Reexported modules documentation support - Documentation generated with
Cairo Version
This version of Scarb comes with Cairo v2.9.1
.
What's Changed
- Test compilation diagnostics reporter by @maciektr in #1577
- Dependencies crate settings by @wawel37 in #1616
- Use compiler's paths directly / remove workaround code by @wawel37 in #1609
- Doc/support reexported modules by @wawel37 in #1620
- Cairo update by @maciektr in #1625
- Add signature for struct's member by @wawel37 in #1601
- Pass contract declarations to compile_test_prepared_db / Cairo update by @maciektr in #1636
- Do not allow importing by test target name in integration tests by @maciektr in #1634
- Update Cairo by @maciektr in #1641
- Bump the non-critical group with 4 updates by @dependabot in #1645
- Support packaging cairo-plugins by @DelevoXDG in #1605
- Add diagnostics and handle errors gracefully / Upgrade Cairo. by @wawel37 in #1590
- Hide docs for impls of hidden traits / traits with hidden generic args. by @maciektr in #1644
- Enable features for main package during integration tests compilation by @DelevoXDG in #1646
- Add add_redeposit_gas to compiler config by @maciektr in #1650
- Fix packaging plugins when
--no-verify
is passed by @DelevoXDG in #1643 - Doc fix - procedural macros by @wawel37 in #1651
- Doc typo fix - Publishing to registry by @DelevoXDG in #1654
- Bump the non-critical group with 7 updates by @dependabot in #1664
- Stop using process:exit for error code handling by @maciektr in #1652
- Add CI to publish builtin plugins by @DelevoXDG in #1648
- Return ExitCode instead of process:exit() in extensions by @maciektr in #1667
- Update mermaid dependency by @maciektr in #1671
- Support UI verbosity in scarb-doc by @maciektr in #1668
- Update Cairo by @maciektr in #1672
- Remove snforge-test-collector by @piotmag769 in #1675
- Remove code mappings for attribute expand (temp) by @maciektr in #1657
- Add
scarb-doc
-generated corelib docs to GitHub Pages by @DelevoXDG in #1658 - Add component dependencies to metadata by @piotmag769 in #1655
- Add test for building corelib docs by @maciektr in #1687
- Add warning on unset edition by @DelevoXDG in #1663
- Feat: Support --print-detailed-resources parameter in cairo-run by @maciejka in #1688
- Fix tests for cairo-run args validation by @maciektr in #1691
- Bump gix from 0.66.0 to 0.67.0 by @dependabot in #1693
- Bump the non-critical group with 9 updates by @dependabot in #1692
- Prepare
scarb-metadata
release1.13.0
by @maciektr in #1694 - Update Cairo by @maciektr in #1711
- Add advisory lock for registry cache db by @maciektr in #1712
- Bump the non-critical group with 6 updates by @dependabot in #1713
- Cairo update by @maciektr in #1714
- Add
--ignore-cairo-version
flag by @DelevoXDG in #1666 - Add derives to
cairo-lang-macro
by @Draggu in #1676 - Proc macro server API by @Draggu in #1715
- Add
proc-macro-server
command by @Draggu in #1679 - Proc macro server: Load
ProcMacroHost
by @Draggu in #1680 - Add Proc macro server by @Draggu in #1681
- Add
RpcResponse
result helper by @Draggu in #1719 - Add request handling by @Draggu in #1682
- Add test helpers by @Draggu in #1718
- Add
DefinedMacros
handler by @Draggu in #1683 - Add
ExpandAttribute
handler by @Draggu in #1684 - Add
ExpandDerive
handler by @Draggu in #1685 - Add
ExpandInline
handler by @Draggu in #1686 - Bump the non-critical group with 4 updates by @dependabot in #1723
- Add cairo-ls as code owners of proc-macro-server by @maciektr in #1730
- Update Cairo by @maciektr in #1739
- Prepare
cairo-lang-macro
release0.1.1
by @maciektr in #1740 - Prepare
scarb-proc-macro-server-types
release0.1.0
. by @maciektr in #1741 - Website: Suggest asdf as the default installation method by @maciektr in #1744
- Bump the non-critical group with 7 updates by @dependabot in #1752
- Mute UI when reading ws for external command by @maciektr in #1755
- Cairo update by @maciektr in https://github.com/software-mansion/scarb/pull/...
v2.8.5
Welcome to the release notes for Scarb v2.8.5
!
The primary aim of this release is to bring Cairo compiler fix release.
New developments included
- Support packaging cairo-plugins - Scarb can now be called with
scarb package
andscarb publish
on a package, that implements procedural macros. - Support enabling features when compiling integration tests - This release fixes a bug, because of which selected features have not been enabled on main package of integration tests.
Cairo Version
This version of Scarb comes with Cairo v2.8.5
.
What's Changed
- Support packaging cairo-plugins by @DelevoXDG in #1605
- Enable features for main package during integration tests compilation by @DelevoXDG in #1646
- Fix packaging plugins when --no-verify is passed by @DelevoXDG in #1643
- Doc fix - procedural macros by @wawel37 in #1651
- Doc typo fix - Publishing to registry by @DelevoXDG in #1654
- Stop using process:exit for error code handling by @maciektr in #1652
- Add CI to publish builtin plugins by @DelevoXDG in #1648
- Return ExitCode instead of process:exit() in extensions by @maciektr in #1667
- Update mermaid dependency by @maciektr in #1671
Full Changelog: v2.8.4...v2.8.5
v2.8.4
Welcome to the release notes for Scarb v2.8.4
!
The primary aim of this release is to bring Cairo compiler fix release.
New developments included
scarb fmt
for formatting path - Scarb formatter can now accept paths to format. This can be useful when integrating with external tooling.#[doc(hidden)]
support in Scarb Doc - Since this release, you can hide docs for some parts of your codebase with#[doc(hidden)]
attributes.
Cairo Version
This version of Scarb comes with Cairo v2.8.4
.
What's Changed
- Ignore items with #[doc(hidden)] by @wawel37 in #1597
- Update snforge init test for foundry 0.31.0 by @maciektr in #1618
- Bump the non-critical group with 4 updates by @dependabot in #1621
- Fix documentation typo by @wawel37 in #1624
- feat: scarb fmt a subdirectory by @enitrat in #1626
- Update scarb docs by @maciektr in #1630
- Bump deno_task_shell from 0.18.0 to 0.18.1 by @dependabot in #1633
- Bump once_cell from 1.20.0 to 1.20.2 in the non-critical group by @dependabot in #1632
New Contributors
Full Changelog: v2.8.3...v2.8.4