#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

#28 in #invoke

Download history 69/week @ 2024-11-13 93/week @ 2024-11-20 70/week @ 2024-11-27 25/week @ 2024-12-04 19/week @ 2024-12-11 33/week @ 2024-12-18 1/week @ 2024-12-25 8/week @ 2025-01-01 37/week @ 2025-01-08 58/week @ 2025-01-15 42/week @ 2025-01-22 15/week @ 2025-01-29 29/week @ 2025-02-05 47/week @ 2025-02-12 86/week @ 2025-02-19 71/week @ 2025-02-26

235 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