Skip to content

[Rust] Consolidate Cargo workspace and reorganize examples#157

Open
teodordelibasic-db wants to merge 2 commits intomainfrom
rust/consolidate-cargo-workspace
Open

[Rust] Consolidate Cargo workspace and reorganize examples#157
teodordelibasic-db wants to merge 2 commits intomainfrom
rust/consolidate-cargo-workspace

Conversation

@teodordelibasic-db
Copy link
Copy Markdown
Contributor

@teodordelibasic-db teodordelibasic-db commented Mar 23, 2026

What changes are proposed in this pull request?

  • Moved Rust examples from rust/examples/ to examples/rust/ as standalone crates depending on the published SDK from crates.io, with the goal of simulating a real client that can just be copied from the repo.
  • Consolidated 4 example crates into 2 (rust-json, rust-proto) with [[example]] targets batch and single, deduplicating the shared proto output/ directory
  • Added [workspace.dependencies] to rust/Cargo.toml, centralizing 21 shared dependencies across workspace members
  • Split CI: new ci-rust-examples.yml (fmt + clippy) runs only on examples/rust/** changes, independent from the main Rust workspace CI

How is this tested?

# Check Workspace
cargo check --workspace --all-targets --manifest-path rust/Cargo.toml
cargo test --workspace --manifest-path rust/Cargo.toml

# Check Examples
cargo check --manifest-path examples/rust/json/Cargo.toml --examples
cargo check --manifest-path examples/rust/proto/Cargo.toml --examples

# Run JSON
cargo run --manifest-path examples/rust/json/Cargo.toml --example batch
cargo run --manifest-path examples/rust/json/Cargo.toml --example single

# Run Proto
cargo run --manifest-path examples/rust/proto/Cargo.toml --example batch
cargo run --manifest-path examples/rust/proto/Cargo.toml --example single

gotocoding-DB
gotocoding-DB previously approved these changes Mar 23, 2026
@teodordelibasic-db teodordelibasic-db force-pushed the rust/consolidate-cargo-workspace branch from 4841a00 to ba5157d Compare March 23, 2026 15:25
@teodordelibasic-db teodordelibasic-db marked this pull request as ready for review March 23, 2026 15:27
elenagaljak-db
elenagaljak-db previously approved these changes Mar 23, 2026
Copy link
Copy Markdown
Contributor

@elenagaljak-db elenagaljak-db left a comment

Choose a reason for hiding this comment

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

Looks very good and I think it will simplify usage a lot. Can you go through READMEs to see if we have any stale instructions on how to run examples?

@teodordelibasic-db teodordelibasic-db force-pushed the rust/consolidate-cargo-workspace branch 2 times, most recently from 0241e96 to 846dbe2 Compare March 24, 2026 10:36
@teodordelibasic-db teodordelibasic-db changed the title [Rust] Consolidate Cargo workspace [Rust] Consolidate Cargo workspace and reorganize examples Mar 24, 2026
Signed-off-by: teodordelibasic-db <teodor.delibasic@databricks.com>
@teodordelibasic-db teodordelibasic-db force-pushed the rust/consolidate-cargo-workspace branch from 7b6b7a3 to ac99796 Compare March 24, 2026 13:56
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.

4 participants