thorstreamer-grpc-client 0.1.1

Rust client for ThorStreamer gRPC streaming services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Build script for the ThorStreamer Rust SDK project.
//!
//! This script uses `tonic_build` to compile the protocol buffer files located in the `proto` directory.
//! It also sets up the file descriptor and instructs Cargo to rerun the build if the proto files change.

fn main() {
    tonic_build::configure()
        .compile_well_known_types(true)
        .out_dir(std::env::var("OUT_DIR").unwrap())
        .protoc_arg("--experimental_allow_proto3_optional")
        .build_server(false)
        .file_descriptor_set_path(std::env::var("OUT_DIR").unwrap() + "/descriptor.bin")
        .compile(&["proto/events.proto", "proto/publisher.proto"], &["proto"])
        .expect("Failed to compile proto");

    println!("cargo:rerun-if-changed=proto/events.proto");
    println!("cargo:rerun-if-changed=proto/publisher.proto");
}