| Crates.io | protograph-build |
| lib.rs | protograph-build |
| version | 0.1.0 |
| created_at | 2025-12-21 17:43:30.242499+00 |
| updated_at | 2025-12-21 17:43:30.242499+00 |
| description | Build-time code generation for protograph (use in build.rs) |
| homepage | https://github.com/alexchoi0/protograph |
| repository | https://github.com/alexchoi0/protograph |
| max_upload_size | |
| id | 1998372 |
| size | 11,231 |
Build-time code generation for protograph.
Use this in your build.rs to generate Rust code from GraphQL SDL.
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();
}
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();
MIT OR Apache-2.0