Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore]: sharing .proto files across workspace
- Loading branch information
1 parent
ab7ad7a
commit b84f79e
Showing
10 changed files
with
42 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
members = [ | ||
# Tooling | ||
"xtask", | ||
"protos", | ||
"cli", | ||
"development_server", | ||
"wasmtime_components", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
// FIXME: this is a copy of /development_server/build.rs | ||
// | ||
// > it prob makes sense to eventualy get this into its own package. | ||
// > But, for now feel free to just repeat the boilerplate in the CLI. | ||
|
||
use std::{env, path::PathBuf}; | ||
|
||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
// See https://github.com/hyperium/tonic/blob/master/examples/build.rs | ||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
tonic_build::configure() | ||
.file_descriptor_set_path(out_dir.join("development_descriptor.bin")) | ||
.compile(&["proto/development.proto"], &["proto"]) | ||
.compile(&["../protos/proto/development.proto"], &["../protos/proto"]) | ||
.unwrap(); | ||
|
||
tonic_build::compile_protos("proto/development.proto")?; | ||
tonic_build::compile_protos("../protos/proto/development.proto")?; | ||
Ok(()) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "proto" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[build-dependencies] | ||
tonic-build = "0.10.0" | ||
|
||
[dependencies] | ||
tonic-build = "0.10.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use std::{env, path::PathBuf}; | ||
|
||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
// See https://github.com/hyperium/tonic/blob/master/examples/build.rs | ||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
tonic_build::configure() | ||
.file_descriptor_set_path(out_dir.join("development_descriptor.bin")) | ||
.compile(&["../protos/proto/development.proto"], &["../protos/proto"]) | ||
.unwrap(); | ||
|
||
tonic_build::compile_protos("proto/development.proto")?; | ||
Ok(()) | ||
} |
5 changes: 2 additions & 3 deletions
5
development_server/proto/development.proto → protos/proto/development.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
println!("intended for building common .proto files"); | ||
} |