protograph-build

Crates.ioprotograph-build
lib.rsprotograph-build
version0.1.0
created_at2025-12-21 17:43:30.242499+00
updated_at2025-12-21 17:43:30.242499+00
descriptionBuild-time code generation for protograph (use in build.rs)
homepagehttps://github.com/alexchoi0/protograph
repositoryhttps://github.com/alexchoi0/protograph
max_upload_size
id1998372
size11,231
Alex Choi (alexchoi0)

documentation

README

protograph-build

Build-time code generation for protograph.

Use this in your build.rs to generate Rust code from GraphQL SDL.

Usage

Add to your build dependencies:

[build-dependencies]
protograph-build = "0.1"

Create a build.rs:

fn main() {
    protograph_build::configure()
        .schema_file("schema.graphql")
        .compile()
        .unwrap();
}

API

protograph_build::configure()
    .schema_file("schema.graphql")      // Required: path to GraphQL SDL
    .rust_out_dir("src/generated")      // Optional: defaults to OUT_DIR
    .proto_out_dir("proto/generated")   // Optional: where to write .proto
    .compile()
    .unwrap();

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt