#tonic #protobuf #macro #proto #namespaces #correct #invoke

macro tonic-include-proto

Macro to include protobuf built with tonic

2 releases

0.1.1 Apr 29, 2022
0.1.0 Jan 28, 2022

#24 in #invoke

Download history 86/week @ 2024-07-20 72/week @ 2024-07-27 77/week @ 2024-08-03 75/week @ 2024-08-10 23/week @ 2024-08-17 59/week @ 2024-08-24 59/week @ 2024-08-31 101/week @ 2024-09-07 25/week @ 2024-09-14 107/week @ 2024-09-21 108/week @ 2024-09-28 106/week @ 2024-10-05 101/week @ 2024-10-12 103/week @ 2024-10-19 44/week @ 2024-10-26 70/week @ 2024-11-02

331 downloads per month

MIT license

6KB
95 lines

Tonic include_proto utilities

A crate to make using tonic::include_proto less painful.

namespaced!

This macro invokes the macro tonic::include_proto for multiple protobuf packages and each of them are placed in the correct namespace.

Example

The code:

tonic_include_proto::namespaced!("x.y", "x.z");

is equivalent to:

mod x {
    mod y {
        tonic::include_proto!("x.y");
    }
    mod z {
        tonic::include_proto!("x.z");
    }
}

lib.rs:

A crate to make using tonic::include_proto less painful.

Dependencies

~1.5MB
~38K SLoC