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.
- 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 #2592
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #2589
- Bump actions/download-artifact from 4 to 5 by @dependabot[bot] in #2590
- Integrate oracles into cairo-test by @mkaput in #2513
- support default params for test targets by @FroyaTheHen in #2583
- Implement shelloracle protocol by @mkaput in #2581
- Define macro fingerprint callback interface by @maciektr in #2586
- Document shelloracle protocol by @mkaput in #2582
- Prepare cairo-lang-macro-attributesrelease0.2.1by @maciektr in #2596
- Prepare cairo-lang-macrorelease0.2.1by @maciektr in #2597
- Fix completions_block install script by @JulianGCalderon in #2598
- Read incremental cache files in parallel by @maciektr in #2602
- Bump the non-critical group with 4 updates by @dependabot[bot] in #2605
- Bump cairo-toolchain-xtasks by @maciektr in #2615
- Bump Cairo by @mkaput in #2594
- Split oracle tests in scarb-execute into multiple files by @mkaput in #2619
- Bump vite from 5.4.19 to 5.4.20 in /website by @dependabot[bot] in #2623
- Ignore flaky https_something_happens on windows runners by @maciektr in #2620
- Support binary sources in ProjectBuilder by @mkaput in #2631
- Bump Cairo by @DelevoXDG in #2637
- Bump semver from 1.0.26 to 1.0.27 by @dependabot[bot] in #2639
- Add require-auditsto Scarb.toml by @DelevoXDG in #2560
- Bypass audit requirement for dev deps by @DelevoXDG in #2561
- Refactor yanked version filtering in line with audit filtering by @DelevoXDG in #2617
- Test scarb updatein audit and regular context by @DelevoXDG in #2563
- Remove old link from help by @maciektr in #2647
- feat: document macro declarations by @FroyaTheHen in #2574
- support workspace target-defaults by @FroyaTheHen in #2603
- Add allow-no-auditsto Scarb.toml to bypass audit requirements by @DelevoXDG in #2562
- Disallow git and path deps when audit requirement is enabled by @DelevoXDG in #2566
- Bump Cairo, LS and lint by @piotmag769 in #2648
- Add scarb listto list registry package versions by @DelevoXDG in #2575
- update docs: workspace target-defaults by @FroyaTheHen in #2604
- Limit amount of versions listed by scarb list; Add--allflag by @DelevoXDG in #2576
- docs: bump guide version by @DelevoXDG in #2588
- Parallelize contracts casm calculation by @maciektr in #2636
- Bump ammonia from 4.1.1 to 4.1.2 by @dependabot[bot] in #2657
- Warmup cached lowerings in parallel by @maciektr in #2655
- Simplify shell oracle capabilities by @mkaput in #2661
- Implement wasmoracle by @mkaput in #2632
- Bump the non-critical group across 1 directory with 10 updates by @dependabot[bot] in #2662
- Propagate mdbook stderr in scarb doc by @FroyaTheHen in #2650
- fix docs <> oracles by @DelevoXDG in #2665
- Handle selector ambiguities in wasmoracle by @mkaput in #2633
- Implement E2E tests for the wasmoracle by @mkaput in #2634
- Implement live stderr streaming with "err" span for WASM oracle connections (#2627) by @Copilot in #2635
- Add tracing instrumentation by @maciektr in #2670
- Disable WASM oracle protocol until it's fully implemented by @mkaput in #2668
- Add fmt and clippy components to rust-toolchain action by @THenry14 in #2672
- Remove forgotten dbg! by @mkaput in #2667
- Bump Cairo by @maciektr in #2664
- Simplify list_source_filesimplementation and deduplicate result by @mkaput in #2674
- Refactor Package::includeby @mkaput in #2675
- Add assetsfield to Scarb.toml by @mkaput in #2673
- Bump the non-critical group with 6 updates by @dependabot[bot] in #2679
- Bump starknet-types-core from 0.2.0 to 0.2.2 by @dependabot[bot] in #2678
- Bump Cairo by @maciektr in #2687
- Do not calculate warnings for cached crates if printing warnings is disabled by @maciektr in #2656
- Save information about warnings in cache by @maciektr in #2658
- Implement assets mechanism on the oracle hint service side by @mkaput in #2671
- Document the assetsfield by @mkaput in #2680
- Test WASM oracle state is persisted across invokes by @mkaput in #2681
- Bump actions/setup-node from 4 to 5 by @dependabot[bot] in #2694
- Document wasm protocol by @mkaput in #2682
- Syntax highlight WIT by @mkaput in #2683
- Revert "Disable WASM oracle protocol until it's fully implemented (#2668)" by @mkaput in #2684
- Remove the stdioprotocol by @mkaput in #2695
- Don't run Windows tests on pull requests and merge queue by @Copilot in #2691
- Bump Cairo by @maciektr in #2698
- Allow dev build concurrency by @maciektr in #2699
- Allow Proc Macro Server to load macros from arbitrary workspaces at runtime by @integraledelebesgue in #2645
- Ensure tokio runtime is closed before the config struct is dropped by @maciektr in #2703
- Add Benchmarking guide by @maciektr in #2705
- Make oracle selectors ByteArrays instead of shortstrings by @mkaput in #2697
- Update WASM docs by @mkaput in #2704
- Add special buildscript that executes before compilation by @Copilot in #2701
- Update changelog for scarb-oracle-hint-service v0.1.0 release by @mkaput in #2706
- Mention the shell package in docs by @mkaput in #2707
- Bump the non-critical group with 2 updates by @dependabot[bot] in #2715
- Use CairoLS from mainbranch by @integraledelebesgue in #2716
- Remove ScarbSnapboxExtand movescarb_cacheintoScarbby @mkaput in #2713
- Add Scarb::target_dirby @mkaput in #2714
- Allow compiling executable to Sierra by @maciektr in #2676
- Preopen executor's PWD by @mkaput in #2709
- Add test case for git force push with local cache by @maciektr in #2720
- Do not query registry to build resolve graph by @maciektr in #2721
- Avoid waiting for registry query of locked package versions by @maciektr in #2722
- Do not block on inc cache warmup by @maciektr in #2711
- Bump libc from 0.2.176 to 0.2.177 in the non-critical group by @dependabot[bot] in #2727
- Revert "Do not block on inc cache warmup (#2711)" by @maciektr in #2728
- Bump Cairo by @DelevoXDG in #2724
- Remove oracle SDKs mentions from overview documentation by @Copilot in #2719
- Stabilize oracles by removing --experimental-oraclesCLI flag by @Copilot in #2712
- Remove unused gixfeatures by @mkaput in #2729
- Remove deprecated scarb-crate documentation page by @Copilot in #2736
- Announce cairo-test deprecation in documentation by @Copilot in #2742
- Write E2E test for network access within wasm oracles by @Copilot in #2735
- Upgrade axumto 0.8.6 by @mkaput in #2731
- Remove unused starknet-types-corereference fromCargo.tomlby @mkaput in #2733
- Do not block on inc cache warmup by @maciektr in #2747
- Enable thin LTO by @mkaput in #2746
- Update reqwestto 0.12 by @mkaput in #2732
- Print architecture information in scarb --versionby @mkaput in #2748
- Use MiMallocallocator by @Draggu in #2751
- Announce cairo-test deprecation when calling scarb-cairo-test by @Copilot in #2743
- Save trace data for cairo-profiler by @THenry14 in #2644
- Remove cairo-test template and make snforge the default test runner by @Copilot in #2745
- Cleanup build_assets.rs by @mkaput in #2754
- Allow two compilation unit components to declare the same asset by @mkaput in #2755
- Print diagnostics count for failed builds by @maciektr in #2753
- Refactor of scarb lint by @wawel37 in #2749
- Update dependencies by @maciektr in #2762
- Fix scarb-execute test case path assert on windows by @maciektr in #2756
- Update snapbox to 0.6 by @maciektr in #2763
- Enable mimalloc secure feature in scarb-execute by @maciektr in #2767
- Bump vite from 5.4.20 to 5.4.21 in /website by @dependabot[bot] in #2768
- Disable default features for reqwest again by @mkaput in #2769
- Don't verify testing in smoke tests by @mkaput in #2771
- Run windows test on pull requests with test-windows label by @maciektr in #2772
- Fix tests on windows: remove exe redaction from some asserts by @maciektr in #2773
- Update wasm.md to remove future capabilities note by @mkaput in #2734
- Document reqwest features shenanigans by @mkaput in #2776
- fix contract size limits by @DelevoXDG in #2779
- Prepare scarb-proc-macro-server-typesrelease0.4.0by @maciektr in #2782
- Add warning for non-default inlining strategy in rel ease profile by @maciektr in #2783
- Bump gix from 0.73.0 to 0.74.1 by @maciektr in #2788
- Bump the non-critical group with 12 updates by @dependabot[bot] in #2785
- Support module-level inline macro by @DelevoXDG in #2766
- Dispatch action to cairo lint on new tag (ignoring RCs) by @wawel37 in #2791
- One mdbook for workspace packages by @FroyaTheHen in #2780
- Downgrade WASM to 37 by @maciektr in #2798
New Contributors
- @houpo-bob made their first contribution in #2450
- @JulianGCalderon made their first contribution in #2598
Full Changelog: v2.11.2...v2.13.1