#beam #protobuf #apache-beam

beam-proto-rs

Rust codes generated from apache/beam .proto

1 stable release

2.41.0 Sep 5, 2022

#8 in #beam

Apache-2.0

3MB
63K SLoC

Rust 37K SLoC // 0.1% comments Go 23K SLoC // 0.1% comments Java 3.5K SLoC // 0.3% comments

beam-proto-rs

Rust codes generated from protocol buffer files in the apache/beam repository.

This repository also provides a build script to compile the protobuf into Rust codes.

Versioning

This crate basically follows the beam's versions.

  • v2.41.0 is generated from .protos from apache/beam tag:v2.41.0.
  • Some versions may have build numbers like v2.41.0+N, which means the N-th build (N > 1) generated from beam's tag:v2.41.0. 2nd and later builds are typically for bugfixes.

Development

Build

Generating .rs from beam's .proto requires build-proto feature flag.

cargo build --features build-proto -vv

-vv is to show eprintln!() strings to your terminal.

Updating Beam

beam/ is a git submodule.

cd beam
git fetch --tags
git checkout v<NEW VERSION>
cd ..
git commit -am 'build: bump up beam to v<NEW VERSION>'

Deployment

  1. Change version in Cargo.toml.
  2. Update Beam.
  3. Shrink submodule size to avoid 413 error from crates.io: cd beam; git sparse-checkout set model; cd ..
  4. In the main branch: cargo publish.

License

Licensed under Apache License, Version 2.0.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in beam-proto-rs by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Copyright (c) 2022 Sho Nakatani <lay.sakura@gmail.com>.

Dependencies

~1.6–3MB
~56K SLoC