Skip to content

Releases: software-mansion/scarb

v2.11.3

13 Mar 13:45
1576415
Compare
Choose a tag to compare

Cairo release notes ➡️

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

11 Mar 22:42
9c1873c
Compare
Choose a tag to compare

Cairo release notes ➡️

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

Full Changelog: v2.11.1...v2.11.2

v2.11.1

06 Mar 15:40
6619e74
Compare
Choose a tag to compare

Cairo release notes ➡️

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

06 Mar 09:20
b245d76
Compare
Choose a tag to compare

Cairo release notes ➡️

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

Full Changelog: v2.10.1...v2.11.0

v2.10.1

20 Feb 10:06
Compare
Choose a tag to compare

Cairo release notes ➡️

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

Full Changelog: v2.10.0...v2.10.1

v2.9.4

19 Feb 23:19
d3be9eb
Compare
Choose a tag to compare

Cairo release notes ➡️

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

18 Feb 08:55
Compare
Choose a tag to compare

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

v2.9.3

17 Feb 08:30
Compare
Choose a tag to compare

Cairo release notes ➡️

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

18 Jan 00:07
Compare
Choose a tag to compare
v2.10.0-rc.1 Pre-release
Pre-release

Cairo release notes ➡️

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

New Contributors

Full Changelog: https://github.com/software-mansion/scarb/compare/v2.10.0-rc.0..v2.10.0-rc.1

v2.10.0-rc.0

08 Jan 21:54
Compare
Choose a tag to compare
v2.10.0-rc.0 Pre-release
Pre-release

Cairo release notes ➡️

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

New Contributors

Full Changelog: v2.9.2...v2.10.0-rc.0