#protobuf #macro #tonic #proto #namespaces #invoke #packages

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

#29 in #invoke

Download history 87/week @ 2024-10-22 52/week @ 2024-10-29 65/week @ 2024-11-05 59/week @ 2024-11-12 99/week @ 2024-11-19 83/week @ 2024-11-26 28/week @ 2024-12-03 19/week @ 2024-12-10 28/week @ 2024-12-17 8/week @ 2024-12-24 4/week @ 2024-12-31 31/week @ 2025-01-07 66/week @ 2025-01-14 36/week @ 2025-01-21 21/week @ 2025-01-28 28/week @ 2025-02-04

158 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