Releases: software-mansion/scarb
v2.14.0
Welcome to the release notes for Scarb v2.14.0!
This release:
- Promotes Scarb
2.14.0-rc.0to stable release. - Changes the default project template created with
scarb new. Note, that this change may breake compatibility withsnforge newin older Starknet Foundry versions. In such cases, please upgrade Starknet Foundry to latest version, or create new projects withscarb new, choosing Starknet Foundry test runner. - Introduces better handling of visbility of reexported items in Scarb doc.
Cairo Version
This version of Scarb comes with Cairo v2.14.0.
What's Changed
- Remove 'seconds' from test assert by @maciektr in #2861
- doc- suppress mdbook info for not md output format by @FroyaTheHen in #2858
- check for doc hidden in reeeksports, handle reeksported macro calls @FroyaTheHen in #2866
- Bump the non-critical group with 11 updates by @dependabot in #2871
- Properly delete Scarb managed cache in tests by @maciektr in #2863
- Rename quick_snapbox to quick_command in test setup, following underlying impl change by @maciektr in #2867
- Migrate github macos runners to newer versions by @maciektr in #2868
- Update Scarb new template by @maciektr in #2841
- Check absolute path for existence in scarb new by @maciektr in in #2878
Full Changelog: v2.14.0-rc.0...v2.14.0
v2.14.0-rc.0
Welcome to the release notes for Scarb v2.14.0-rc.0!
This release includes several features and bugfixes.
- Unit artifacts fingerprints - We now fingerprint artifacts produces by Scarb. This means, that if you run Scarb a second time, without changing anything in your code or in the target directory, Scarb will skip the compilation saving your time!
- The new
quote_format!macro in procedural macro API - Some Cairo syntax may not play nicely withquote!macro. In such cases, you can usequote_format!, which accepts any Cairo syntax. It works similar toformatdoc!macro you may already know. - Option to skip all compiler optimizations - If you need to output raw Sierra, without any optimizations applied by the compiler, you may use the new
skip-optimizationsoption in the[cairo]section. Use with cauation! This makes sense only for some dev tooling you may need.
Cairo Version
This version of Scarb comes with Cairo v2.14.0-rc.0.
What's Changed
- Fix dispatch on tag by @wawel37 in #2799
- Fix Scarb builtin packages registry publish workflow after cairo-test deprecation by @maciektr in #2801
- Fix lints after Rust upgrade by @maciektr in #2803
- Bump Cairo by @maciektr in #2802
- Fix detecting test-windows label in CI by @maciektr in #2804
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #2808
- Bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #2809
- Bump actions/setup-node from 5 to 6 by @dependabot[bot] in #2807
- Refactor enabled incremental context to inner struct by @maciektr in #2786
- Reorder help message by @maciektr in #2816
- Refactor: Split proc macro expand tests into multiple files by @maciektr in #2813
- Add tracing span to cargo metadata calls by @maciektr in #2822
- Update Cairo by @maciektr in #2825
- Create helper for checking env var truthiness by @maciektr in #2826
- Add
quote_format!macro with non-Rust Cairo syntax support by @DelevoXDG in #2806 - Make
workspace_manifestnon optional by @piotmag769 in #2833 - add optional .mdx files generation to scarb doc by @FroyaTheHen in #2811
- Fix attr proc macro args span to start at zero by @maciektr in #2814
- Fix test case for git source change by @maciektr in #2832
- docs: add breaking behavior config for formatting by @tserg in #2835
- Fix website formatting by @maciektr in #2838
- Implement unit artifacts fingferprint by @maciektr in #2787
- Fix tests on windows by @maciektr in #2839
- Allow disabling artifacts fingerprint with env var by @maciektr in #2827
- Deduplicate cargo metadata calls across the whole run by @maciektr in #2828
- Add test cases for unit artifacts fingerprints by @maciektr in #2829
- Rewrite procedural macro docs by @maciektr in #2815
- Add 2025 Q4 & 2026 Q1 Roadmap by @maciektr in #2818
- Prepare
cairo-lang-macrorelease0.2.2by @DelevoXDG in #2812 - Update deps by @maciektr in #2837
- Bump wasmtime from 37.0.2 to 37.0.3 by @dependabot[bot] in #2842
- Fix Cairo version in manifest reference by @maciektr in #2847
- Fix error message for compiler manifest in ws member toml by @piotmag769 in #2848
- Clean up logic related to profiles and compiler config by @piotmag769 in #2849
- check file paths in ExpectDir by @FroyaTheHen in #2851
- Allow to skip compiler optimizations by @piotmag769 in #2850
- generate mdx file content by @FroyaTheHen in #2843
- add support mdx for scarb doc --workspace by @FroyaTheHen in #2844
- pass file extension instead of setting global const by @FroyaTheHen in #2845
- common OutputEmit variant for md and mdx by @FroyaTheHen in #2846
- support exposed macro calls in doc by @FroyaTheHen in #2831
- Add rust toolchain info to proc macro docs by @maciektr in #2852
- Fix scarb build --target-kinds=test by @maciektr in #2855
- Prepare release
2.14.0-rc.0by @maciektr in #2859
Full Changelog: v2.13.1...v2.14.0-rc.0
v2.13.1
Welcome to the release notes for Scarb v2.13.1!
Small change to our contacts: If you want to chat, but don't want to use our public Telegram channel (https://t.me/+1pMLtrNj5NthZWJk), you can chat with us privately on Telegram via @scarb_chat account (https://t.me/scarb_chat).
- Package audits verification - Since scarbs.xyz registry supports uploading package audits, you can request Scarb to only download packages that has been audited. The information is based on the registry and audits for packages can be seen on "Security" tab in package view. The flag
require-auditscan be added to[workspace]definition. See docs for context. - Documenting declarative macro definitions - Scarb doc can now generate documentation for declarative macro definitions. Macro definition can be annotated with
///doc comments, similar to other items. - Generating workspace documentation - Since this release, if you run Scarb doc with
--workspaceflag, it will generate a single mdbook documentation for your whole workspace. Before, it would generate docs for each of the packages separately. This can be helpful, if you need to publish docs for whole workspace at once. - Module level inline macros support - Scarb inline procedural macros can now be used at top-level of a Cairo module, including at top level of Cairo file. This might be helpful, if you want your macro to generate some code, like function definitions. No changes to existing macros are required.
- Defining default params for targets - The new
target-defaultskey in Scarb manifest can be used to declare default values for user-defined or auto-detected compilation targets, by kind. This is especially useful, if you need to define some key (e.g.build-external-contracts) for multiple targets of the same kind (e.g. all test targets). See docs here for more information. - Compiling executable targets to Sierra - Executable targets can be compiled to Sierra json format, by adding
sierra = truein[executable]target definition props. - Macro fingerprint callback interface - Scarb procedural macros can define a callback, that will be called when deciding if incremental cache should be used. This is required to support incremental compilation if your macro is non-deterministic in regards to input token stream. See docs here for context.
- Version resolver network access optimization - This version introduces optimized version resolution algorithm, that should avoid making unnecessary network requests, in cotexts like re-runing Scarb with pre-downloaded cache and up-to-date lockfile. This can be especially helpful when working with Scarb on unstable network connection.
Oracles support
This Scarb release includes stable implementation of Cairo oracles!
An oracle is an external process (like a script, binary, or web service) that exposes custom logic or data to a Cairo program at runtime.
You use it to perform tasks the Cairo VM can't, such as accessing real-world data or executing complex, non-provable computations.
Oracles can be used with Scarb execute or Starknet Foundry Forge.
Learn more by reading Oracles docs.
Assets
Scarb manifest can now declare additional project files, that should be treated as runtime assets of the package.
All assets declared by the current package and all of its transitive dependencies are copied into the workspace target directory at build time.
Assets also declare files as included for publishing.
This can be usefull, if you need to distribute additional files used at runtime with your Scarb package.
Learn more by reading assets docs.
Cairo-profiler integration with Scarb execute
This release allows you to use cairo-profiler to analyze runtime performance of Cairo code executed with scarb execute.
To use this feature, you need to generate profiler trace, by using --save-profiler-trace-data flag when executing your program.
See Cairo profiler project readme to learn more.
Cairo-run removal
This release removes the builtin Scarb cairo-run extension, which has been deprecated since Scarb v2.10.0.
Please use scarb execute instead.
Cairo-test deprecation
This release marks the builtin Scarb cairo-test extension as deprecated and bound to be removed in future release.
Please use Starknet Foundry instead.
Cairo Version
This version of Scarb comes with Cairo v2.13.1.
What's Changed
- Move ProfileSpec to scarb-ui by @maciektr in #2434
- Prepare
scarb-uirelease0.1.7by @maciektr in #2435 - extract
scarb-oracle-hint-processorpackage by @mkaput in #2439 - chore: fix some minor issues in comments by @houpo-bob in #2450
- scarb-execute: extend resource info with memory segments & improve formatting by @m-kus in #2447
- Remove primitive resolver by @maciektr in #2458
- Add tracing instrument for resolver thread by @maciektr in #2469
- Add copilot setup workflow by @maciektr in #2484
- Bump slackapi/slack-github-action from 2.1.0 to 2.1.1 by @dependabot[bot] in #2480
- Prepare release of proc macro crates by @maciektr in #2489
- Bump deno_task_shell from 0.25.3 to 0.26.0 by @dependabot[bot] in #2492
- Bump cairo-vm from 2.2.0 to 2.3.1 by @dependabot[bot] in #2490
- Publish builtin plugins to dev registry by @DelevoXDG in #2496
- Bump the non-critical group with 9 updates by @dependabot[bot] in #2491
- Bump Scarb version by @maciektr in #2501
- Bump
cairo-toolchain-xtasksandtoml_editby @mkaput in #2504 - Bump linter by @wawel37 in #2503
- Add warning to unsafe-panic docs by @maciektr in #2502
- validate file steams custom source path target by @FroyaTheHen in #2487
- Derive
Defaultand implementDebugforConnectionManagerby @mkaput in #2508 - Refactor file lock guards by @mkaput in #2506
- Introduce HintService abstraction and move HintProcessor back to scarb-execute by @mkaput in #2509
- Bump Cairo by @maciektr in #2511
- Rename
scarb-oracle-hint-processortoscarb-oracle-hint-serviceby @mkaput in #2510 - Bump deno_task_shell from 0.26.0 to 0.26.1 by @dependabot[bot] in #2531
- Move test_oracle.py and oracle_asserts to scarb-test-support by @mkaput in #2512
- Optimize building token stream by @maciektr in #2525
- Bump the non-critical group with 9 updates by @dependabot[bot] in #2533
- Update locked dependencies by @mkaput in #2539
- Remove cairo-run by @maciektr in #2530
- Make proc macros expand first by @piotmag769 in #2546
- Bump mermaid from 11.4.1 to 11.10.0 in /website by @dependabot[bot] in #2559
- Bump the non-critical group across 1 directory with 10 updates by @dependabot[bot] in #2571
- Make cfg plugin run first by @piotmag769 in #2572
- Make
OracleCheatcodeSelectoropaque by @mkaput in #2578 - Allow providing protocols externally by @mkaput in #2579
- Use Cargo features to make it possible to disable builtin oracle protocols by @mkaput in #2580
- Bump tracing-subscriber from 0.3.19 to 0.3.20 by @dependabot[bot] in #2585
- Bump Cairo by @maciektr in #2577
- Bump bnjbvr/cargo-machete from 0.8.0 to 0.9.1 by @dependabot[bot] in #2591
- Bump actions/upload-pages-artifact from 3 to 4 by @dependabot[bot] in #259...
v2.12.2
Welcome to the release notes for Scarb v2.12.2!
The release introduces couple of fixes, improved cache handling, adds file embeddings support to scarb doc .
cache handling
Enhanced cache file handling by delaying creation until the cache is ready, securing file access with locks during reads, appending component names to cache traces, and ensuring cache fingerprint files are written after the cache itself.
scarb doc
Support mdbook file embedding syntax, updated mdbook features related documentation.
fixes
- inline macro diagnostics
- table formatting in scarb doc generated summary page.
Cairo Version
This version of Scarb comes with Cairo v2.12.2.
What's Changed
- Fix spans in inline macros by @maciektr in #2599
- feat: minor adjustment file embeding support in scarb doc, update docs by @FroyaTheHen in (#2608)
- Run xtask on stable rust by @maciektr in #2616
- Make incremental cache file handling more defensive by @maciektr in #2601
Full Changelog: v2.12.1...v2.12.2
v2.12.1
Welcome to the release notes for Scarb v2.12.1!
This release brings several performance improvements and bugfixes.
Compiler plugins execution order change
Up to this release, all procedural macros has been expanded after all builtin compiler plugins.
From this release, procedural macros are expanded before all builtin compiler plugins, except for the cfg config plugin, which is run as the first.
Cairo Version
This version of Scarb comes with Cairo v2.12.1.
What's Changed
- Create artifacts writer by @maciektr in #2424
- Use offloader to write starknet artifacts by @maciektr in #2440
- Perform downloads asynchronously by @maciektr in #2451
- Use new linter group for linter diags by @wawel37 in #2446
- update link in package name validation error message by @FroyaTheHen in #2488
- Parallelize calculating checksums for fingerprints by @maciektr in #2470
- Parallelize caclulating incremental cache by @maciektr in #2471
- Fix Rust 1.89.0 lints by @mkaput in #2507
- Bump cairo-lint and cairols by @mkaput
- Loosen version sync requirements by @mkaput in #2547
- Prepare release 2.12.1-rc.0 by @mkaput
- allow multiple builds per day by @FroyaTheHen in #2514
- fix: get all matching tags by @FroyaTheHen in #2557
- Make token streams for derive macros relative by @piotmag769 in #2558
- Bump lint for 2.12.1 by @piotmag769 in #2564
- Last LS bump for 2.12.1 by @piotmag769 in #2567
- Bump cairo for 2.12.1 by @piotmag769 in #2570
- Fix clippy + Cherry pick: make proc macros expand first + make cfg plugin run first by @piotmag769 in #2573
Full Changelog: v2.12.0...v2.12.1
v2.12.1-rc.0
Welcome to the release notes for Scarb v2.12.1-rc.0!
Cairo Version
This version of Scarb comes with Cairo v2.12.0.
What's Changed
Full Changelog: v2.12.0...v2.12.1-rc.0
v2.12.0
Welcome to the release notes for Scarb v2.12.0!
This release promotes 2.12.0-rc.4 to a stable version.
Cairo Version
This version of Scarb comes with Cairo v2.12.0.
Full Changelog: v2.12.0-rc.4...v2.12.0
v2.12.0-rc.4
Welcome to the release notes for Scarb v2.12.0-rc.4!
This release brings several bugfixes to Scarb.
Default inlining strategy in dev profile
This release reverts the changes made in 2.12.0-rc.2 regarding the default inlining strategy for the dev profile.
Since this release, both the dev and release profile will use the release (default) strategy.
For more information, please see our docs.
Cairo Version
This version of Scarb comes with Cairo v2.12.0-rc.3.
What's Changed
- fix: multiple parallel builds deadlock by @FroyaTheHen in #2467
- Change inlining strategy in dev to default by @maciektr in #2462
- Update deps by @maciektr in #2464
Full Changelog: v2.12.0-rc.3...v2.12.0-rc.4
v2.12.0-rc.3
Welcome to the release notes for Scarb v2.12.0-rc.3!
This release brings several bugfixes on Cairo and Scarb level.
Cairo Version
This version of Scarb comes with Cairo v2.12.0-rc.3.
What's Changed
- upgrade vitepress, vue and prettier by @mkaput in #2423
- add oracle docs by @mkaput in #2421
- fix markdown in creating-executable-package.md by @mkaput in #2433
- Change error message and add a warning for executable target by @maciektr in #2436
- Snforge-scarb-plugin fingerprint hack by @maciektr in #2441
- Save fingerprint digests on the first calculation by @maciektr in #2442
- Fix ScarbCommand error message on Scarb exiting with error by @maciektr in #2453
- Prepare scarb-metadata release v1.15.1 by @maciektr in #2454
- Set release as alias for default in inlining-strategy deserializer by @maciektr in #2457
- Bump deno_task_shell from 0.25.2 to 0.25.3 by @maciektr in #2460
- Rewrite token stream spans to start at zero, for optimized get_text method by @maciektr in #2448
- Update docs for by inlining-strategy @maciektr in #2462
Full Changelog: v2.12.0-rc.2...v2.12.0-rc.3
v2.12.0-rc.2
Welcome to the release notes for Scarb v2.12.0-rc.2!
Default inlining strategy in dev profile
This release changes the default inlining strategy settings for the dev profile to avoid.
The strategy used by release profile is not changed.
This means you should especially make sure to use release when compiling your contracts for deployment.
For more information, please see our docs.
Incremental compilation
This release of Scarb brings incremental compilation support to the Cairo ecosystem.
Incremental compilation means, that Scarb can now cache some steps of your compilation process and reuse this cache in subsequent builds. Hence after initial build, following builds should complete faster. If you build your Scarb project now, you can notice two new directories in the target directory - incremental and .fingerprint - which contain the caches. This means, that to use the cache, you need to preserve the target directory between the runs. The cache is saved on a package level and it will only be used, if a whole package did not change.
Oracles (experimental)
An oracle is an external process (like a script, binary, or web service) that exposes custom logic or data to a Cairo program. You use it to perform tasks the Cairo VM can't, such as accessing real-world data or executing complex, non-provable computations. This Scarb release brings initial support for oracles in scarb execute with a new --experimental-oracles flag.
To use oracles, you need to add a dependency on the oracle package:
[dependencies]
oracle = "0.1.0-dev.4"Then, in your Cairo program, write a module that wraps the oracle in an idiomatic API:
mod my_oracle {
pub fn funny_hash(x: u64) -> oracle::Result<u64> {
oracle::invoke("stdio:cargo -q run --manifest-path my_oracle/Cargo.toml", 'funny_hash', (x,))
}
}
#[executable]
fn main() {
let x = my_oracle::funny_hash(42);
println!("Funny hash of 42 is: {:?}", x);
}We also build a Rust crate that eases implementing oracles in this language. We plan to build similar SDKs for other languages depending on community demands.
use cairo_oracle_server::Oracle;
use std::process::ExitCode;
fn main() -> ExitCode {
Oracle::new()
.provide("funny_hash", |value: u64| {
Ok((value.rotate_left(13) ^ 0x517cc1b727220a95).rotate_right(7) + value)
})
.run()
}To run this executable, you must now explicitly enable oracle support. We plan to remove this flag once oracles will become stabilised.
scarb execute --experimental-oraclesYou can read more about oracles in the oracle package documentation and in Scarb docs. We will be happy to hear feedback on this feature and see what ideas this enables!
Cairo Version
This version of Scarb comes with Cairo v2.12.0-rc.2.
What's Changed
- implement example oracle to be used in future tests by @mkaput in #2380
- Fix incremental cache file name, update test case by @maciektr in #2371
- Include component dependencies in fingerprint digest by @maciektr in #2340
- fix selector short string parsing by @mkaput in #2387
- Update CI snippets by @mkaput in #2393
- Bump deno_task_shell from 0.24.0 to 0.25.1 by @dependabot[bot] in #2398
- Bump the non-critical group with 4 updates by @dependabot[bot] in #2400
- Bump starknet-types-core from 0.1.8 to 0.1.9 by @dependabot[bot] in #2399
- add minimal JSON-RPC types implementation by @mkaput in #2386
- implement
StdioJsonRpcConnectionby @mkaput in #2381 - make
oracle_json_rpc_smoke_testwork on Windows by @mkaput in #2395 - use
shell-wordscrate to parse connection strings and in place of custom shlex join by @mkaput in #2394 - pipe stderr to logs in
StdioJsonRpcConnectionby @mkaput in #2396 - Calculate source checksums in fingerprint by @maciektr in #2369
- Disallow calling profile
executeorproveby @maciektr in #2407 - pipe oracle stderr as debug level instead of trace by @mkaput in #2408
- Prepare
scarb-uirelease0.1.6by @maciektr in #2389 - Fix flaky test cases by @maciektr in #2410
- fix oracle result encoding by @mkaput in #2409
- Fix variable interpolation in docs by @maciektr in #2412
- Authenticate github API requests in website CI by @maciektr in #2413
- Fix docs: elvish completions by @DelevoXDG in #2414
- Only lookup full path markers when any declared by macros by @maciektr in #2420
- Do not run diagnostics reporter check on all crates in test contract compilation by @maciektr in #2418
- Add dependency cfg_set to fingerprint id by @maciektr in #2419
- Warn on compiler config specified in ws member manifest by @maciektr in #2411
- Add docs for patch and features by @maciektr in #2417
- Include all component deps in fingerprint id by @maciektr in #2426
- Bump dependencies by @maciektr in #2430
Full Changelog: v2.12.0-rc.1...v2.12.0-rc.2