Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix Rust build with protoc versions lacking native proto3 optional (#10343)

Chris Lu7bfc44432d15
diff --git a/seaweed-volume/build.rs b/seaweed-volume/build.rs
index 08d5cb3927..a42b8bdfc9 100644
--- a/seaweed-volume/build.rs
+++ b/seaweed-volume/build.rs
@@ -3,6 +3,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
.build_server(true)
.build_client(true)
+ // filer.proto uses proto3 optional; older protoc (e.g. 3.12 from ubuntu-22.04 apt)
+ // rejects it without this flag, and newer protoc still accepts the flag
+ .protoc_arg("--experimental_allow_proto3_optional")
.file_descriptor_set_path(out_dir.join("seaweed_descriptor.bin"))
.compile_protos(
&[