This is an automated email from the ASF dual-hosted git repository.

yuxia pushed a commit to branch release-0.1
in repository https://gitbox.apache.org/repos/asf/fluss-rust.git

commit 91ba1c6ba4ead60703f63b2d405009a4974d4e65
Author: luoyuxia <[email protected]>
AuthorDate: Tue Mar 3 17:29:33 2026 +0800

    ci: use protox instead of protoc for proto compilation
    
    Replace protoc dependency with protox, a pure Rust protobuf compiler.
    This eliminates the need for protoc binary in manylinux containers
    and other cross-compilation environments.
    
    Changes:
    - Add protox dependency for pure Rust proto parsing
    - Use protox::compile() to parse proto files
    - Use prost-build::compile_fds() with parsed FileDescriptorSet
    - Downgrade prost-build to 0.12 for compatibility with protox
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 crates/fluss/Cargo.toml |  4 +++-
 crates/fluss/build.rs   | 11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/crates/fluss/Cargo.toml b/crates/fluss/Cargo.toml
index db1348a..7fb87ff 100644
--- a/crates/fluss/Cargo.toml
+++ b/crates/fluss/Cargo.toml
@@ -82,4 +82,6 @@ test-env-helpers = "0.2.2"
 
 
 [build-dependencies]
-prost-build = { version = "0.14" }
+prost-build = { version = "0.12" }
+prost-types = "0.12"
+protox = "0.6.0"
diff --git a/crates/fluss/build.rs b/crates/fluss/build.rs
index 265208a..fc4cf13 100644
--- a/crates/fluss/build.rs
+++ b/crates/fluss/build.rs
@@ -18,11 +18,20 @@
 use std::io::Result;
 
 fn main() -> Result<()> {
+    // Use protox to parse proto files (pure Rust, no protoc needed)
+    let file_descriptor_set = 
protox::compile(&["src/proto/fluss_api.proto"],&["src/proto"])
+        .expect("Failed to parse proto files");
+
     let mut config = prost_build::Config::new();
     config.bytes([
         ".proto.PbProduceLogReqForBucket.records",
         ".proto.PbPutKvReqForBucket.records",
     ]);
-    config.compile_protos(&["src/proto/fluss_api.proto"], &["src/proto"])?;
+
+    // Compile using the parsed file descriptor set
+    config
+        .compile_fds(file_descriptor_set)
+        .expect("Failed to compile proto files");
+
     Ok(())
 }

Reply via email to