Skip to content

Releases: software-mansion/scarb

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

v2.9.2

11 Dec 22:57
Compare
Choose a tag to compare

Cairo release notes ➡️

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

New Contributors

Full Changelog: v2.9.1...v2.9.2

v2.9.1

30 Nov 00:05
aba4f60
Compare
Choose a tag to compare

Cairo release notes ➡️

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.
  • 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 with scarb package and published with scarb 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.
  • 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 with scarb doc.
    • Corelib documentation on Scarb website - Cairo core library documentation is now automatically published on Scarb documentation website with every release.

Cairo Version

This version of Scarb comes with Cairo v2.9.1.

What's Changed

Read more

v2.8.5

19 Nov 07:39
Compare
Choose a tag to compare

Cairo release notes ➡️

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 and scarb 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

Full Changelog: v2.8.4...v2.8.5

v2.8.4

07 Oct 18:19
Compare
Choose a tag to compare

Cairo release notes ➡️

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

New Contributors

Full Changelog: v2.8.3...v2.8.4