Skip to content

Commit

Permalink
feat: embed protoc in shuttle-proto (#715)
Browse files Browse the repository at this point in the history
* feat: embed protoc in shuttle-proto

* fix: path to shuttle-next in runtime next-resource
  • Loading branch information
oddgrd authored Mar 15, 2023
1 parent 2ea253a commit a588e25
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ workspace = true
features = ["error", "service", "wasm"]

[build-dependencies]
protoc-bin-vendored = "3.0.0"
tonic-build = "0.8.3"
6 changes: 6 additions & 0 deletions proto/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
let protoc = protoc_bin_vendored::protoc_bin_path().unwrap();
let protoc_include = protoc_bin_vendored::include_path().unwrap();

std::env::set_var("PROTOC", protoc);
std::env::set_var("PROTOC_INCLUDE", protoc_include);

tonic_build::configure().compile(&["./provisioner.proto", "./runtime.proto"], &["./"])?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion runtime/tests/resources/axum-wasm-expanded/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ crate-type = [ "cdylib" ]

[dependencies]
futures = "0.3.25"
shuttle-next = { path = "../../../../next" }
shuttle-next = { path = "../../../../services/shuttle-next" }
tracing = "0.1.37"

0 comments on commit a588e25

Please sign in to comment.