Skip to content

Commit

Permalink
[BLD] Auto rebuild protos if they change in rust (chroma-core#1902)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Auto rebuild protos if they change in rust
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
  • Loading branch information
HammadB authored Mar 20, 2024
1 parent 51883f3 commit 976aee3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions rust/worker/build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Compile the protobuf files in the chromadb proto directory.
tonic_build::configure().compile(
&[
"../../idl/chromadb/proto/chroma.proto",
"../../idl/chromadb/proto/coordinator.proto",
"../../idl/chromadb/proto/logservice.proto",
],
&["../../idl/"],
)?;
tonic_build::configure()
.emit_rerun_if_changed(true)
.compile(
&[
"../../idl/chromadb/proto/chroma.proto",
"../../idl/chromadb/proto/coordinator.proto",
"../../idl/chromadb/proto/logservice.proto",
],
&["../../idl/"],
)?;

// Compile the hnswlib bindings.
cc::Build::new()
Expand Down

0 comments on commit 976aee3

Please sign in to comment.