1 unstable release

0.2.0 Dec 31, 2020

#9 in #arcon

AGPL-3.0-only

4KB

ci Cargo License

arcon build

arcon_build is a crate for generating arcon data types from .proto files.


lib.rs:

arcon_build is a wrapper around prost-build that adds the required attributes for it to work in arcon.

[dependencies]
arcon = <arcon-version>
serde = <arcon-serde-version>
prost = <arcon-prost-version>
abomonation = <arcon-abomonation-version>
abomonation_derive = <arcon-abomonation-derive-version>

[build-dependencies]
arcon_build = { version = <arcon-version> }

Example .proto file

syntax = "proto3";

package arcon_data;

// unsafe_ser_id = 100
// reliable_ser_id = 101
// version = 1
message Hello {
string id = 1
}

Generate the Rust code by creating a build.rs build script and use the compile_protos function:

fn main() -> Result<()> {
  arcon_build::compile_protos(&["src/path_to_file.proto"], &["src/"])?;
  Ok(())
}

Dependencies

~7–16MB
~207K SLoC