create rust workspace (#32014)
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Prefer an explicitly configured protoc; otherwise use the vendored
|
||||
// binary so builds (including `cargo clippy` and the pre-commit hook on
|
||||
// machines/CI runners without protobuf installed) are self-contained.
|
||||
// protoc_bin_path() errs on platforms the vendored crate doesn't cover;
|
||||
// those fall back to prost-build's own lookup of `protoc` on PATH.
|
||||
if std::env::var_os("PROTOC").is_none()
|
||||
&& let Ok(vendored) = protoc_bin_vendored::protoc_bin_path()
|
||||
{
|
||||
// SAFETY: build scripts are single-threaded at this point.
|
||||
unsafe { std::env::set_var("PROTOC", vendored) };
|
||||
}
|
||||
|
||||
let proto_path = "../../proto/sglang/runtime/v1/sglang.proto";
|
||||
|
||||
tonic_build::configure()
|
||||
|
||||
Reference in New Issue
Block a user