Skip to main content

proto.rs — Protobuf Module

This file simply includes the generated Rust code for the packets protobuf module:

rust

pub mod packets {
    include!(concat!(env!("OUT_DIR"), "/packets.rs"));
}

The actual .proto source files live in src-tauri/proto/. They are compiled at build time by build.rs into packets.rs in the Cargo OUT_DIR. Importing crate::proto::packets::* in any Rust file gives access to all the generated message structs.