Skip to content

Introduce a Cargo workspace so both crates build and lint together #4

Description

@priscaenoch

Problem

explorer and ticket are separate crates with no shared root workspace (ticket/Cargo.toml even declares its own empty [workspace]). Consequently cargo build, cargo test, cargo clippy, and cargo fmt must be run separately per crate, build-and-deploy.sh iterates directories manually, and there is no shared lockfile or lint configuration. Introducing a workspace is a cross-cutting change touching both crate manifests, a new root manifest, the lockfile, the build/deploy script, and CI.

What needs to be done

  • Add a root Cargo.toml defining a workspace with explorer and ticket as members, and remove the standalone [workspace] from ticket/Cargo.toml.
  • Preserve the per-crate [profile.release] settings required for Soroban (for example panic = "abort", overflow-checks, lto) at the workspace level where needed, and confirm each crate still builds the same wasm artifact.
  • Update build-and-deploy.sh to use workspace-aware commands rather than iterating directories.
  • Update the CI workflow (once added) to run workspace-wide build/test/clippy/fmt.
  • Confirm the release wasm32-unknown-unknown build for both crates is unchanged and still deploys after the documented wasm-opt step.

Files

  • new root Cargo.toml
  • explorer/Cargo.toml
  • ticket/Cargo.toml
  • Cargo.lock
  • build-and-deploy.sh
  • .github/workflows/ci.yml
  • README.md

Acceptance deliverables

  • cargo build/test/clippy/fmt run across both crates from the repository root.
  • wasm artifacts are unchanged and still deploy successfully.
  • All CI checks pass; the change cannot be merged until CI is green.

Tests to pass

  • cargo test at the workspace root runs both crates' tests.
  • The release wasm build for both crates succeeds and matches the previous artifacts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ADVANCESubstantial, cross-cutting work spanning more than five files. Not a minor fix.GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions