| Crates.io | volo-build |
| lib.rs | volo-build |
| version | 0.11.5 |
| created_at | 2022-08-23 07:19:52.659603+00 |
| updated_at | 2025-09-08 08:10:49.183016+00 |
| description | Compile thrift and protobuf idls into rust code at compile-time. |
| homepage | https://www.cloudwego.io/docs/volo/ |
| repository | https://github.com/cloudwego/volo |
| max_upload_size | |
| id | 650814 |
| size | 200,917 |
volo-build compiles thrift and protobuf idl files into rust code at compile-time.
Usually, if you are using volo-cli to generate the code, you don't need to use volo-build directly.
If you want to use volo-build directly, you can follow the following steps:
First, add volo-build to your Cargo.toml:
[build-dependencies]
volo-build = "*" # make sure you use a compatible version with `volo`
Second, creates a build.rs file:
fn main() {
volo_build::Builder::default().write().unwrap();
}
Third, creates a volo.yml file in the same directory of build.rs with the following layout:
---
idls:
- source: local
path: path/to/your/idl.thrift
- source: local
path: path/to/your/protobuf/idl.proto
includes:
- path/to/your/protobuf/
- source: git
repo: git@github.com:cloudwego/volo.git
ref: main
path: path/in/repo/idl.thrift
That's it!