Summary
The Structure of a Rust Contract page (docs/stylus/reference/project-structure.mdx) does not mention Stylus.toml, which is now required by cargo-stylus 0.10.0+ (shipped with stylus-sdk-rs v0.10.0, January 2026).
Without this file, cargo stylus deploy, cargo stylus check, and other commands fail with:
error: missing Stylus.toml
What needs updating
- Project layout section — Add
Stylus.toml to the file tree:
- src
- lib.rs
- main.rs
- Cargo.toml
- rust-toolchain.toml
- Stylus.toml
- Add a description paragraph for
Stylus.toml alongside the existing descriptions for Cargo.toml and rust-toolchain.toml. Suggested content:
Stylus.toml is required by cargo-stylus to identify the package as a Stylus contract. For a standalone contract, it contains [workspace] and [contract] section headers. In a cargo workspace with multiple contracts, the workspace root has a Stylus.toml with a [workspace] section, and each individual contract directory has its own Stylus.toml with a [contract] section. Network configurations for deployment can optionally be defined under [workspace.networks].
- Minimal example for a standalone contract:
[workspace]
[workspace.networks]
[contract]
Context
- Introduced in stylus-sdk-rs v0.10.0
- Source:
stylus-tools/templates/contract/Stylus.toml and stylus-tools/src/core/manifest/mod.rs
- The v0.10.0 changelog notes: "Contracts are marked with a
Stylus.toml file. Future configuration will be added to this file."
Summary
The Structure of a Rust Contract page (
docs/stylus/reference/project-structure.mdx) does not mentionStylus.toml, which is now required bycargo-stylus0.10.0+ (shipped withstylus-sdk-rsv0.10.0, January 2026).Without this file,
cargo stylus deploy,cargo stylus check, and other commands fail with:What needs updating
Stylus.tomlto the file tree:- src - lib.rs - main.rs - Cargo.toml - rust-toolchain.toml - Stylus.tomlStylus.tomlalongside the existing descriptions forCargo.tomlandrust-toolchain.toml. Suggested content:Context
stylus-tools/templates/contract/Stylus.tomlandstylus-tools/src/core/manifest/mod.rsStylus.tomlfile. Future configuration will be added to this file."