Skip to content

Set up Cargo workspace and standardize dependencies#207

Merged
dymk merged 1 commit intoOpenDevicePartnership:mainfrom
dymk:dymk/workspaceify
Mar 31, 2025
Merged

Set up Cargo workspace and standardize dependencies#207
dymk merged 1 commit intoOpenDevicePartnership:mainfrom
dymk:dymk/workspaceify

Conversation

@dymk
Copy link
Copy Markdown
Contributor

@dymk dymk commented Mar 27, 2025

What changes does this PR introduce?

This PR sets up a Cargo workspace at the repository root and standardizes dependencies across all service crates. It unifies dependency management and makes it easier to maintain consistent versions across crates within the project.

Key changes:

  1. Added a root Cargo.toml with workspace configuration
  2. Moved common dependency specifications to workspace-level
  3. Updated all service crates to use workspace dependencies
  4. Added cargo test to GitHub Actions
  5. Check no_std targets compile
  6. Check rt633 example compiles - the other examples are broken, and can be fixed in a future PR.
  7. Cleaned up individual Cargo.toml files for consistent formatting
  8. Exclude example directories from the workspace as they are effectively separate projects
  9. Commit Cargo.lock to prevent future breakages due to upstream crates

Why?

  • Simplifies dependency management across all crates
  • Ensures consistent dependency versions
  • Makes it easier to update dependencies in one place
  • Improves build times through shared target directories
  • Ensure tests and builds do not break if changes are made cross-package via CI/CD

Comment thread .github/workflows/check.yml
Copy link
Copy Markdown
Contributor

@asasine asasine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes would be good but not blocking on them.

Comment thread Cargo.toml Outdated
Comment thread embedded-service/Cargo.toml
Comment thread examples/rt633/Cargo.toml
Comment thread rustfmt.toml
Comment thread type-c-service/src/driver/tps6699x.rs Outdated
@dymk dymk force-pushed the dymk/workspaceify branch 2 times, most recently from a132e2f to bbb413e Compare March 28, 2025 17:13
@jerrysxie jerrysxie added the enhancement New feature or request label Mar 31, 2025
@jerrysxie jerrysxie requested a review from asasine March 31, 2025 15:08
jerrysxie
jerrysxie previously approved these changes Mar 31, 2025
…ss multiple services. Add testing workflow to GitHub Actions for improved CI/CD. Clean up Cargo.toml files for unified depenencies across all crates.
@dymk dymk force-pushed the dymk/workspaceify branch from 845d6a3 to 66944e1 Compare March 31, 2025 15:55
@dymk dymk merged commit 93b5aaa into OpenDevicePartnership:main Mar 31, 2025
11 checks passed
@dymk dymk deleted the dymk/workspaceify branch May 5, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants