Skip to content

🔄 [MEDIUM] Cargo Workspace Members vs Actual Contract Directories Alignment #1002

Description

@ayomideadeniran

Description

The root Cargo.toml workspace members list includes some contracts that follow a different naming convention or may not exist as workspace-eligible packages.

Location

/Cargo.toml lines 22-43:

[workspace]
members = [
    "contracts/debugging-utils",
    "contracts/cross-contract-utils",
    ...
]

Current State

All 21 workspace member contracts have their Cargo.toml files. However, the root Cargo.toml workspace does NOT include many of the ~90 contracts in the contracts/ directory. There is no clear documentation on:

  • Which contracts are part of the workspace vs standalone
  • Criteria for adding a contract to the workspace
  • Why some contracts are excluded

Impact

  • Running cargo build from root only builds 21 out of ~90 contracts
  • Contributors may add contracts to the wrong location
  • No clear distinction between "workspace" and "non-workspace" contracts

Required Fix

  1. Document the selection criteria for workspace members
  2. Either add all contracts to the workspace or organize them into sub-workspaces
  3. Consider adding a cargo check --workspace CI step to validate all members build

Reference

Identified during full codebase audit of soroban-playground.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcontractSmart contract issuesenhancementNew feature or requestrustRust programming language

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions