globuid 0.1.0

A globally unique ID generator with pluggable algorithms and transport layer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2026 GlobUid Contributors
// SPDX-License-Identifier: Apache-2.0

//! Build script for generating gRPC code.

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Check if grpc feature is enabled via cargo:rustc-cfg
    let is_grpc = std::env::var("CARGO_FEATURE_GRPC").is_ok();

    if is_grpc {
        tonic_build::configure()
            .build_server(true)
            .build_client(false)
            .compile_protos(&["proto/globuid.proto"], &["proto"])?;
    }

    Ok(())
}