Skip to content
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

Add python code generation #72

Merged
merged 21 commits into from
Sep 29, 2023
Merged

Add python code generation #72

merged 21 commits into from
Sep 29, 2023

Conversation

alexespencer
Copy link
Contributor

@alexespencer alexespencer commented Sep 21, 2023

My first rust contribution, this code:

  • Allows --lang python to be passed to buffrs generate as well as an optional --out-dir argument which can redirect where the generated python code is exported to.
  • Makes use of protocs --proto-path to give finer control over the location of generated code

@alexespencer alexespencer marked this pull request as ready for review September 27, 2023 12:17
@alexespencer alexespencer changed the title Asp/python code gen Add python code generation Sep 27, 2023
@alexespencer
Copy link
Contributor Author

Do we need to modify: https://helsing-ai.github.io/buffrs/integrations/cargo.html
Where we recommend build.rs is:

fn main() {
    buffrs::build(buffrs::Language::Rust).unwrap();
}

As Language::Rust has been removed from the enum, and lib.rs by default uses Tonic

@mara-schulke
Copy link
Contributor

Yes!

Copy link
Contributor

@mara-schulke mara-schulke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some things on the generation code, otherwise it looks good to me

Copy link
Contributor

@mara-schulke mara-schulke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last nits, let's merge once they are resolved :)

@alexespencer alexespencer merged commit 738be5e into main Sep 29, 2023
@alexespencer alexespencer deleted the asp/python-code-gen branch September 29, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants