#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

#15 in #namespace

Download history 59/week @ 2023-12-05 35/week @ 2023-12-12 1/week @ 2024-01-02 12/week @ 2024-01-09 11/week @ 2024-01-16 18/week @ 2024-01-23 47/week @ 2024-01-30 37/week @ 2024-02-06 12/week @ 2024-02-13 48/week @ 2024-02-20 49/week @ 2024-02-27 38/week @ 2024-03-05 64/week @ 2024-03-12 48/week @ 2024-03-19

220 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
~33K SLoC