Expand description
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(())
}
Functions§
- compile_
protos - Compile Protobuf files with Arcon configured attributes