Rust SDK

A library for writing Apache Beam pipelines in Rust.

The SDK is under active development. The design and its review are in the RFC shared on the dev@beam.apache.org mailing list.

Crate Layout

The SDK is a Cargo workspace with its root at sdks/rust:

CratePathContents
apache-beambeam/Facade crate exposing the unified beam::prelude::*.
apache-beam-modelbeam/model/Protobuf and gRPC bindings generated from the standard Beam model protos.
apache-beam-corebeam/core/The pipeline model: DoFn and ProcessContext, core transforms, coders, windowing, state and timers, schemas, options, and the runner/filesystem registries.
apache-beam-derivebeam/derive/#[derive(BeamRow)], #[derive(BeamEnum)], #[derive(Outputs)], #[derive(State)], #[derive(Timers)], and #[derive(Register)] proc-macros. apache-beam-core re-exports them. Do not depend on this crate directly.

Building and Testing

Run builds through Gradle, like the rest of the Beam repository:

./gradlew :sdks:rust:build   # Compile all crates
./gradlew :sdks:rust:test    # Run all tests (one crate: -Ppkg=<crate>)
./gradlew :sdks:rust:check   # rustfmt --check + clippy -D warnings
./gradlew :sdks:rust:fmt     # Apply formatting

For the full task reference, see docs/development.md.

Contributing

See the Beam Contribution Guide. Each new file must have the standard Apache 2.0 license header. Before you open a PR, run ./gradlew :sdks:rust:check to verify compliance.