github software-mansion/scarb v2.12.0-rc.0

latest releases: cairo-lang-macro/v0.2.1, cairo-lang-macro-attributes/v0.2.1, v2.12.1...
pre-release3 months ago

Cairo release notes ➡️

Welcome to the release notes for Scarb v2.12.0-rc.0!

This release is all about polish, and productivity. We’ve introduced several improvements across doc generation, linting, packaging, other tooling and Scarb itself. This release also includes a preview of the new procedural macro API.

  • 🧱️ New scarb tree command – Quickly visualize your package's dependency tree from the CLI.
  • 📚 Improved navigation in generated documentation – Scarb doc will now generated documentation with navigation based on modules tree, interactive links in paths and signatures and a shiny new module landing pages.
  • 📘 Builtin mdBook support – Scarb doc can now build your docs with mdbook for you, providing full support for Cairo syntax highlighting out of the box. You can try it out by running scarb doc --build.
  • 🧩 CLI completions – Scarb can now generate completions script, you can use with the shell of your choice. Navigating Scarb CLI has never been easier!
  • 📦 Resolver improvements – The depedency resolver now supports dependency patches, specyfing features for dependencies and automatic upgrade of locked versions on conflicts.
  • 📦 Packaging improvements – Scarb will now include information about dev-dependencies and features, when packaging for registry publish.
  • Scarb lint improvements - Lint can now be used with --features CLI arguments, will respect the allow-warnings set in manifest and can specify files / directories to modify by path.
  • Procedural macro related changes - Usage of procedural macros and/or prebuilt procedural macros can now be disabled through CLI flags / enviromental variables. The macro::full_path_marker attribute has been renamed to proc_macro::full_path_marker.
  • New procedural macro API - You can check out preview version of the new procedural macro API.

📦 scarb tree Command

You can now inspect your dependencies through the all-new scarb tree command! This view is perfect for understanding the depth and structure of your project’s dependency tree.

📚 Enhanced Documentation Experience

Documentation in Scarb just got a major facelift! This release introduces:

  • A new landing page as the entry point to your project's docs.
  • Navigation based on module tree structure.
  • Links directly in function signatures to associated documentation items.

Taken together, these features improve discoverability and make your documentation way more readable for your users.

Dependency features

Features of dependencies can now be enabled within the dependency declaration.

[dependencies]
example = { version = "*", features = ["poseidon"] }

The default features can be disabled using default-features = false:

[dependencies]
example = { version = "*", default-features = false, features = ["poseidon"] }

See more on features page of our docs.

Dependency patches

The new [patch] section of Scarb.toml manifest can be used to override dependencies with other versions. The syntax is similar to the [dependencies] section:

[patch.scarbs-xyz]
foo = { git = 'https://github.com/example/foo.git' }
bar = { path = 'my/local/bar' }

[patch.'https://github.com/example/baz']
baz = { git = 'https://github.com/example/patched-baz.git', branch = 'my-branch' }

The [patch] table is made of dependency-like sub-tables. Each key after [patch] is a URL of the source that is being patched, or the name of a registry. The name scarbs-xyz may be used to override the default registry scarbs.xyz. The first [patch] in the example above demonstrates overriding scarbs.xyz, and the second [patch] demonstrates overriding a git source.

Cairo Version

This version of Scarb comes with Cairo v2.12.0-rc.0.

What's Changed

New Contributors

Full Changelog: v2.11.4...v2.12.0-rc.0

Don't miss a new scarb release

NewReleases is sending notifications on new releases.