Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/dwarves

crates/dwarves-embed/build.rs

// build.rs — compile the trimmed `proto/dwarf.proto` into a prost+tonic CLIENT.
//
// Pure-Rust codegen (the nordisk zero-shell charter): `protox` (a pure-Rust .proto
// parser) produces the FileDescriptorSet, then `tonic-build` emits the client
// bindings from it — no `protoc` binary, no C. Mirrors `nornir-funnel-embed/build.rs`.

fn main() {
    println!("cargo:rerun-if-changed=proto/dwarf.proto");
    println!("cargo:rerun-if-changed=proto/mimir_release.proto");
    println!("cargo:rerun-if-changed=proto/tune_app.proto");
    println!("cargo:rerun-if-changed=proto/explorer.proto");
    println!("cargo:rerun-if-changed=build.rs");

    // `mimir_release.proto` is the forge's file byte for byte (a test keeps it so).
    let fds = protox::compile(
        [
            "proto/dwarf.proto",
            "proto/mimir_release.proto",
            "proto/tune_app.proto",
            "proto/explorer.proto",
        ],
        ["proto"],
    )
    .expect("protox: compile dwarf.proto + mimir_release.proto + explorer.proto");

    tonic_prost_build::configure()
        .build_server(false)
        .build_client(true)
        .compile_fds(fds)
        .expect("tonic-build: codegen");
}