#protobuf #macro #tonic #proto #namespaces #invoke #namespaced

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

#23 in #invoke

Download history 61/week @ 2024-03-15 47/week @ 2024-03-22 50/week @ 2024-03-29 66/week @ 2024-04-05 61/week @ 2024-04-12 96/week @ 2024-04-19 87/week @ 2024-04-26 50/week @ 2024-05-03 9/week @ 2024-05-10 4/week @ 2024-05-17 9/week @ 2024-05-24 34/week @ 2024-05-31 17/week @ 2024-06-07 39/week @ 2024-06-14 25/week @ 2024-06-21 23/week @ 2024-06-28

106 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
~35K SLoC