Skip to content

chore: decouple Rust SDK from dstack core workspace#785

Merged
kvinwang merged 2 commits into
masterfrom
chore/decouple-rust-sdk-workspace
Jul 16, 2026
Merged

chore: decouple Rust SDK from dstack core workspace#785
kvinwang merged 2 commits into
masterfrom
chore/decouple-rust-sdk-workspace

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Summary

The public Rust SDK (dstack-sdk / dstack-sdk-types) only talks to guest-agent over the wire. It is not a library dependency of the core dstack/ crates, but it was listed as a workspace member, which forced every Yocto guest build to rsync sdk/rust just so Cargo could resolve the workspace.

This PR splits the SDK into its own Cargo workspace so core builds no longer need that tree.

Changes

  • sdk/rust is now a standalone workspace (dstack-sdk, dstack-sdk-types, no_std_check) with its own Cargo.lock
  • remove ../sdk/rust members and dstack-sdk-types from dstack/Cargo.toml
  • move no_std_check next to the SDK types it validates
  • dstack-guest.bb only stages dstack/ + rootfs (no SDK rsync)
  • SDK CI (sdk.yaml) and crates.io publish use --manifest-path sdk/rust/Cargo.toml

CI coverage (preserved)

Check Where
Multi-language SDK suite (sdk/run-tests.sh) SDK tests workflow
dstack-sdk-types unit + no_std_test sdk/run-tests.sh + sdk.yaml
WASM dstack-sdk-types sdk.yaml (wasm32-unknown-unknown)
no_std_check on thumbv6m-none-eabi sdk.yaml
Core clippy / fmt / run-tests.sh unchanged Rust checks (no longer pulls SDK)

Local verification

  • cargo check -p dstack-guest-agent in an isolated dstack/ tree without sdk/ present
  • cargo check -p dstack-sdk / cargo test -p dstack-sdk-types under sdk/rust
  • WASM + thumbv6m-none-eabi checks for SDK types / no_std_check

Test plan

  • isolated dstack guest-agent build without sdk sibling
  • sdk workspace tests and no_std/WASM targets
  • CI: Rust checks + SDK tests on this PR

Stop treating sdk/rust as a member of the dstack core workspace. The
packages only share a protocol with guest-agent and do not need to be
resolved when building guest binaries.

- make sdk/rust a standalone workspace with its own lockfile
- move no_std_check next to the SDK types it validates
- drop sdk/rust rsync from the dstack-guest Yocto recipe
- point SDK CI and crates.io publish at sdk/rust/Cargo.toml
Copilot AI review requested due to automatic review settings July 16, 2026 03:35
@kvinwang
kvinwang enabled auto-merge July 16, 2026 03:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR decouples the public Rust SDK (sdk/rust) from the core dstack/ Cargo workspace so core builds (notably Yocto guest builds) no longer need to stage the SDK tree just for workspace resolution.

Changes:

  • Create a standalone Cargo workspace under sdk/rust (including dstack-sdk, dstack-sdk-types, and no_std_check) with its own Cargo.lock.
  • Remove SDK crates from the core dstack/ workspace and stop Yocto guest builds from rsync’ing sdk/rust.
  • Update CI/release automation to use --manifest-path sdk/rust/Cargo.toml for SDK checks and publishing.

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/rust/Cargo.toml Defines the new standalone SDK workspace and centralizes dependency versions.
sdk/rust/Cargo.lock Adds an SDK-specific lockfile for the standalone workspace.
sdk/rust/types/Cargo.toml Removes linkage to the core workspace so types are resolved via the SDK workspace.
sdk/rust/no_std_check/Cargo.toml Marks the check crate as non-publishable and ties it to workspace deps.
sdk/rust/no_std_check/src/lib.rs Adds a minimal #![no_std] compile check that imports dstack-sdk-types.
sdk/rust/README.md Documents that sdk/rust is now a standalone Cargo workspace.
dstack/Cargo.toml Removes SDK members and the dstack-sdk-types workspace dependency from core.
dstack/Cargo.lock Regenerates lockfile after removing SDK crates from the core workspace graph.
os/yocto/layers/meta-dstack/recipes-core/dstack-guest/dstack-guest.bb Stops staging sdk/rust into the Yocto guest build source tree.
.github/workflows/sdk.yaml Updates SDK validation commands to target sdk/rust/Cargo.toml.
.github/workflows/rust-sdk-release.yml Updates version checks to look at the SDK workspace instead of core workspace deps.
.github/scripts/cargo-publish-idempotent.sh Publishes SDK crates using the SDK workspace manifest path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/rust/Cargo.toml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kvinwang
kvinwang merged commit 0b68707 into master Jul 16, 2026
15 checks passed
@kvinwang
kvinwang deleted the chore/decouple-rust-sdk-workspace branch July 20, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants