Skip to content

Commit

Permalink
check in the proto types and have a standalone generator helper (rath…
Browse files Browse the repository at this point in the history
…er than generate at build time)

Signed-off-by: George Mulhearn <[email protected]>
  • Loading branch information
gmulhearn-anonyome committed Nov 25, 2024
1 parent d40d9c7 commit b39bc4c
Show file tree
Hide file tree
Showing 23 changed files with 1,193 additions and 34 deletions.
8 changes: 7 additions & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ members = [
"misc/simple_message_relay",
"misc/display_as_json",
"did_core/did_methods/did_cheqd",
"did_core/did_methods/did_cheqd/cheqd_proto_gen",
]

[workspace.package]
Expand Down
7 changes: 4 additions & 3 deletions did_core/did_methods/did_cheqd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ license.workspace = true
version = "0.1.0"
edition = "2021"

[lib]
name = "did_cheqd"
path = "src/lib.rs"

[dependencies]
did_resolver = { path = "../../did_resolver" }
tonic = { version = "0.12.3", default-features = false, features = [
Expand All @@ -27,6 +31,3 @@ tokio = { version = "1.38.0", default-features = false, features = [
"macros",
"rt",
] }

[build-dependencies]
tonic-build = "0.12.3"
3 changes: 3 additions & 0 deletions did_core/did_methods/did_cheqd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DID Cheqd Resolver

TODO - explain dev maintainence of generated protos
12 changes: 0 additions & 12 deletions did_core/did_methods/did_cheqd/build.rs

This file was deleted.

11 changes: 11 additions & 0 deletions did_core/did_methods/did_cheqd/cheqd_proto_gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "cheqd_proto_gen"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "cheqd-proto-gen"
path = "src/main.rs"

[dependencies]
tonic-build = "0.12.3"
16 changes: 16 additions & 0 deletions did_core/did_methods/did_cheqd/cheqd_proto_gen/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Binary for re-generating the cheqd proto types
fn main() -> Result<(), Box<dyn std::error::Error>> {
let crate_dir = env!("CARGO_MANIFEST_DIR").to_string();

tonic_build::configure()
.build_server(false)
.out_dir(crate_dir.clone() + "/../src/proto")
.compile_protos(
&[
crate_dir.clone() + "/proto/cheqd/did/v2/query.proto",
crate_dir.clone() + "/proto/cheqd/resource/v2/query.proto",
],
&[crate_dir + "/proto"],
)?;
Ok(())
}
15 changes: 0 additions & 15 deletions did_core/did_methods/did_cheqd/proto/greeter.proto

This file was deleted.

Loading

0 comments on commit b39bc4c

Please sign in to comment.