Skip to content

WIP [Rust SDK] Add the Cargo workspace, Gradle integration and model crate - #40508

Draft
prodriguezdefino wants to merge 1 commit into
apache:masterfrom
prodriguezdefino:rust/01-workspace-model
Draft

prodriguezdefino wants to merge 1 commit into
apache:masterfrom
prodriguezdefino:rust/01-workspace-model

Conversation

@prodriguezdefino

Copy link
Copy Markdown
Contributor

First change in the series that adds the Apache Beam Rust SDK.

This change adds:

  • The Cargo workspace at sdks/rust (rustfmt and clippy configuration, workspace lints, dev profiles) with a single member.
  • apache-beam-model: protobuf and gRPC bindings generated at build time from the model protos in this repository (model/pipeline, model/fn-execution, model/job-management).
  • Gradle integration (:sdks:rust), so the SDK builds like the rest of the repository: build, check (rustfmt + clippy -D warnings), test, fmt and clean. build.gradle applies one script per build area from sdks/rust/gradle/; the tasks call cargo, which handles incremental builds. Gradle passes the Beam version from gradle.properties to cargo; no Beam version is hard-coded in the Rust sources.
  • Release tooling: release/src/main/scripts/set_version.sh bumps the Cargo manifests through sdks/rust/scripts/set_version.sh.
  • local-env-setup.sh installs Rust and protoc.
  • README.md and docs/development.md.

First change in the series that adds the Apache Beam Rust SDK.

This change adds:
- The Cargo workspace at sdks/rust (rustfmt and clippy configuration,
  workspace lints, dev profiles) with a single member.
- apache-beam-model: protobuf and gRPC bindings generated at build time
  from the model protos in this repository (model/pipeline,
  model/fn-execution, model/job-management).
- Gradle integration (:sdks:rust), so the SDK builds like the rest of
  the repository: build, check (rustfmt + clippy -D warnings), test, fmt
  and clean. build.gradle applies one script per build area from
  sdks/rust/gradle/; the tasks call cargo, which handles incremental
  builds. Gradle passes the Beam version from gradle.properties to cargo;
  no Beam version is hard-coded in the Rust sources.
- Release tooling: release/src/main/scripts/set_version.sh bumps the
  Cargo manifests through sdks/rust/scripts/set_version.sh.
- local-env-setup.sh installs Rust and protoc.
- README.md and docs/development.md.
@github-actions github-actions Bot added the build label Oct 11, 2026
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.78%. Comparing base (9685063) to head (b81ba09).
⚠️ Report is 106 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40508      +/-   ##
============================================
+ Coverage     58.65%   58.78%   +0.12%     
- Complexity    13843    13922      +79     
============================================
  Files          2579     2585       +6     
  Lines        270366   271702    +1336     
  Branches      11212    11244      +32     
============================================
+ Hits         158587   159713    +1126     
- Misses       105747   105987     +240     
+ Partials       6032     6002      -30     
Flag Coverage Δ
java 65.27% <ø> (+0.19%) ⬆️
python 79.70% <ø> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CH-Abhinav

Copy link
Copy Markdown

Hey @prodriguezdefino, I would like to help this PR as much as possible since I didn't know Beam is getting a Rust SDK. I am new to beam and I am excited to see Rust based work here.

I tested this branch locally on Windows with rustc 1.98 and protoc 36.0 — cargo check built cleanly and all proto/gRPC definitions generated without issues.

One small note: building on Windows requires protoc in PATH (or setting the PROTOC environment variable). Would it be helpful to add a quick mention in docs/development.md regarding installing protoc on Windows (e.g., via winget install Google.Protobuf or manual binary download)?

Happy to help test upcoming PRs on Windows or contribute to the downstream crates as the SDK progresses.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants