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
andfeatures
, when packaging for registry publish. - Scarb lint improvements - Lint can now be used with
--features
CLI arguments, will respect theallow-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 toproc_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
- Stop upgrading stwo in nightly by @maciektr in #2067
- Update cairo by @maciektr in #2057
- Fix slack actions webhooks format by @maciektr in #2071
- Move ignore lints based on metadata to linter / add primitive tests by @wawel37 in #2088
- Create empty build-dev job by @maciektr in #2090
- Bump the non-critical group with 9 updates by @dependabot in #2091
- Dev builds by @maciektr in #2089
- Use compilers renderer for cairo lint by @wawel37 in #2098
- Change cairo lint package name by @wawel37 in #2100
- feat: doc links in signature by @FroyaTheHen in #2069
- Update cairo-toolchain-xtasks by @maciektr in #2108
- Bump deno_task_shell from 0.20.3 to 0.21.0 by @dependabot in #2115
- Update deps by @maciektr in #2117
- New procedural macro API by @maciektr in #1750
- Update release check workflow for v2 macros by @maciektr in #2119
- Add --features to lint cli by @wawel37 in #2123
- Add
panic-backtrace
flag by @ksew1 in #2110 - Proc macro server - v1 + v2 api support by @Arcticae in #2120
- feat: doc sematically sorted modules, interactive path by @FroyaTheHen in #2125
- Restore default mapping for v1 derives on expansion by @Arcticae in #2128
- Cairo update by @maciektr in #2127
- Disable trace padding in proof mode by @DelevoXDG in #2126
- feat: doc landing page by @FroyaTheHen in #2121
- Allow warnings for lint cli / respect allow-warnings from manifest by @wawel37 in #2148
- Inform about the source packages for proc macros in PMS by @integraledelebesgue in #2147
- Update deps by @maciektr in #2136
- Bump vite from 5.4.14 to 5.4.16 in /website by @dependabot in #2152
- Fix casing in derive macro lookup by @maciektr in #2151
- Bump openssl from 0.10.71 to 0.10.72 by @dependabot in #2155
- Bump vite from 5.4.16 to 5.4.17 in /website by @dependabot in #2156
- Upgrade Cairo, LS and Lint by @integraledelebesgue in #2159
- Dependency patches by @maciektr in #2154
- Bump crossbeam-channel from 0.5.14 to 0.5.15 by @dependabot in #2163
- Add span to plugin diagnostics by @DelevoXDG in #2145
- Bump Cairo by @integraledelebesgue in #2164
- Fix secrets handling in build-dev.yml and nightly.yml workflows by @mkaput in #2165
- Fix custom highlighting when deploying corelib docs by @maciektr in #2138
- Bump vite from 5.4.17 to 5.4.18 in /website by @dependabot in #2168
- Move MarkdownTargetChecker to scarb test support as ExpectDir by @maciektr in #2171
- Do not mark nightly as latest when building a dev release by @maciektr in #2167
- Add lenient mode to ExpectDir by @maciektr in #2172
- Bump the non-critical group with 4 updates by @dependabot in #2174
- Bump deno_task_shell from 0.22.0 to 0.23.0 by @dependabot in #2175
- Add mdbook builder as extension by @maciektr in #2173
- Patch highlighter for Cairo when building with scarb-mdbook by @maciektr in #2141
- Mark code blocks as Cairo not Rust by @maciektr in #2142
- fix: escape html by @FroyaTheHen in #2180
- Deduplicate proc macro component collection by @maciektr in #2181
- Cairo update by @maciektr in #2185
- Add env bindings to args parser by @maciektr in #2189
- Fix nightly/dev upload setting latest flag by @maciektr in #2190
- feat: improved doc nav by @FroyaTheHen in #2150
- Pass features args to execute by @maciektr in #2184
- Redirect corelib docs to cairo-lang by @maciektr in #2193
- fix: linking doc items by @FroyaTheHen in #2139
- Do not require project when running verify from proof path by @maciektr in #2182
- Bump deno_task_shell from 0.23.0 to 0.23.1 by @dependabot in #2196
- Bump the non-critical group with 3 updates by @dependabot in #2195
- Explicitly set StableOption to be u8 with 0 assigned for none by @maciektr in #2158
- Run proc macro expansion before executable plugin by @maciektr in #2186
- Include dev dependencies in package command by @mkaput in #2202
- Update Cairo by @maciektr in #2201
- Use scarb-execute instead of cairo-run in scarb tests by @maciektr in #2187
- Support diagnostics with location by @DelevoXDG in #2146
- Bump the non-critical group with 5 updates by @dependabot in #2211
- Fix nightly pipeline by @maciektr in #2219
- Bump vite from 5.4.18 to 5.4.19 in /website by @dependabot in #2220
- Bump the non-critical group with 4 updates by @dependabot in #2221
- Introduce --target-names arg for scarb lint by @wawel37 in #2212
- Do not pipe in xshell::cmd for xtasks by @maciektr in #2223
- ref: document pub uses by @FroyaTheHen in #2216
- feat: merge modules by @FroyaTheHen in #2217
- Test building corelib docs with mdbook by @maciektr in #2199
- Scarb-doc: Only apply starknet plugin to crates that depend on it, Update Cairo by @maciektr in #2226
- Refactor: split host v2 attributes to submodules by @maciektr in #2205
- Refactor: generalize parsing module item attributes by @maciektr in #2206
- Automatically upgrade locked versions on conflicts by @maciektr in #2218
- Cli flags for disabling proc macros by @maciektr in #2192
- Pass Scarb no proc macros flags to subprocesses. by @maciektr in #2230
- Scarb doc hidden tests fix typo by @maciektr in #2231
- Update deps by @maciektr in #2241
- Add features to normalized manifest when packaging by @maciektr in #2234
- Serialize/Deserialize dependency features to toml dependency by @maciektr in #2235
- fix: directly deserialize felt by @0xLucqs in #2246
- Expose dependency features in scarb-metadata by @maciektr in #2236
- Update rust dependencies by @maciektr in #2249
- Reject source dep overrides when inheriting dep from workspace by @maciektr in #2237
- Update Cairo by @maciektr in #2252
- Bump linkme from 0.3.32 to 0.3.33 in the non-critical group by @dependabot in #2256
- Move extension args to
scarb-extensions-cli
by @DelevoXDG in #2253 - Set call site location in generated code mappings by @maciektr in #2258
- Enable features for deps by @maciektr in #2245
- Run machete in CI by @maciektr in #2250
- Use span without trivia as call site location by @maciektr in #2260
- Remove unused deps by @maciektr in #2264
- Allow generating CLI completions by @DelevoXDG in #2251
- Add support for missing module items in proc macro attribute expansion by @maciektr in #2207
- Fix code mappings for inner attr expansion by @maciektr in #2208
- feat: documentation update by @FroyaTheHen in #2266
- Rename macro::full_path_marker to proc_macro::full_path_marker by @maciektr in #2271
- Update Cairo by @maciektr in #2257
- Bump cairo-vm from 2.0.1 to 2.1.0 by @dependabot in #2277
- Add path argument to linter by @MKowalski8 in #2265
- Update deps by @maciektr in #2279
- feat: add info to doc --build by @FroyaTheHen in #2259
- Bump slackapi/slack-github-action from 2.0.0 to 2.1.0 by @dependabot in #2284
- Update Cairo by @DelevoXDG in #2281
- Bump deno_task_shell from 0.23.1 to 0.24.0 by @dependabot in #2285
- Bump cairo-vm from 2.1.0 to 2.2.0 by @dependabot in #2286
- Implement
scarb tree
by @mkaput in #2282 - Update deps by @maciektr in #2289
- feat: attributes mod by @FroyaTheHen in #2272
- Execution args: allow to suppress execution output by @m-kus in #2276
- Use formatter in scarb lint by @wawel37 in #2294
- refactor: separate mod types by @FroyaTheHen in #2273
New Contributors
- @0xLucqs made their first contribution in #2246
- @MKowalski8 made their first contribution in #2265
Full Changelog: v2.11.4...v2.12.0-rc.0