smartive / zitadel-rust

An implementation of the ZITADEL gRPC API in Rust. Complemented with other useful elements such as ServiceAccount auth.
https://docs.rs/zitadel/latest/zitadel/
Other
46 stars 17 forks source link

Upgrade apis to v2 & allow to select apis via feature flag for optimized compile times #565

Closed sprudel closed 2 months ago

sprudel commented 2 months ago

This is achieved by the following steps:

sprudel commented 2 months ago

@buehler getting this PR reviewed fast would be highly appreciated. Happy to discuss any changes/adaption needed :-)

buehler commented 2 months ago

Hi @sprudel

Thanks for your contribution! I really like the changes, especially since everybody is able to selectively use APIs. What I don't understand is the protocc_insertion_deletion_point for features in the cargo.toml file. Can you elaborate what happens there?

Also: Testing/Linting seems to be angry with some changes. Otherwise LGTM.

sprudel commented 2 months ago

Hi, thanks a lot for the quick feedback.

https://docs.rs/protoc-gen-prost-crate/0.4.1/protoc_gen_prost_crate/#cargo-manifest-template describes the mechanism. Basically gen_crate allows to generate the feature flags which need to be added to the Cargo.toml. During generation it must be known where to put the features. This is the reason for these special comments.

I have considered moving the generation to a separate crate, but this would probably make the publishing process more complex.

sprudel commented 2 months ago

@buehler I fixed the clippy warnings, should be good now. I plan to tackle the comments of the other mr this evening.