-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate proto-compiler logic into main.rs #317
Conversation
This comment has been minimized.
This comment has been minimized.
Would it be possible to add a README.md in |
Done.
Yes! |
This reverts commit 22d2e4b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added one minor documentation clarification annoyment but I feel this is good to go.
pub(crate) fn main() { | ||
let ibc_proto_path = "../proto/src/prost"; | ||
fn main() { | ||
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
println!("[info ] Cloning cosmos/cosmos-sdk repository..."); | ||
|
||
let url = "https://github.com/cosmos/cosmos-sdk"; | ||
Repository::clone(url, &sdk_dir).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a more robust solution to this in the tendermint-proto crate. Later, for a next update.
Co-authored-by: Greg Szabo <16846635+greg-szabo@users.noreply.github.com>
Closes: #241
Description
This PR consolidates the proto-compiler crate into a single binary.
Cloning the SDK, compiling the .proto files to Rust, and copying them to the appropriate location now only happen at runtime, whereas it was previously split between build time (via
build.rs
) and runtime (viamain.rs
).This should let us improve on the UX of the proto-compiler binary in the future, eg. by introducing a proper CLI, etc.
For contributor use:
docs/
) and code commentsFiles changed
in the Github PR explorer