49 releases

0.10.19 Mar 6, 2025
0.10.18 Nov 29, 2024
0.10.15 Sep 18, 2024
0.10.12 Jul 29, 2024
0.2.1 Oct 26, 2022

#1296 in Procedural macros

Download history 124/week @ 2024-12-04 242/week @ 2024-12-11 124/week @ 2024-12-18 55/week @ 2024-12-25 83/week @ 2025-01-01 137/week @ 2025-01-08 168/week @ 2025-01-15 108/week @ 2025-01-22 93/week @ 2025-01-29 126/week @ 2025-02-05 293/week @ 2025-02-12 107/week @ 2025-02-19 137/week @ 2025-02-26 264/week @ 2025-03-05 198/week @ 2025-03-12 110/week @ 2025-03-19

719 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

280KB
7K SLoC

Volo

volo-build compiles thrift and protobuf idl files into rust code at compile-time.

Example

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!

Dependencies

~35–50MB
~843K SLoC