Implement builder and accessor proc-macro for Consul types#63
Implement builder and accessor proc-macro for Consul types#63kushudai merged 6 commits intoRoblox:mainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
kushudai
left a comment
There was a problem hiding this comment.
Hey @x0rw Did you consider bon instead of a custom macro?
A little hesitant to ship a proc macro crate on top of the current one to crates.io
See https://bon-rs.com/guide/alternatives
|
Hey @kushudai |
Sounds great! |
|
Yeah, i compared it with |
|
@x0rw I merged a nit. I'm happy to merge this whenever you're ready. |
|
Hey @kushudai . Hey, I've been busy the past week, I really slept on this PR 😅 --- Let me do another manual review tomorrow and update the PR description, then we can get this merged 👍🏻. |
Thank you, no worries at all 😄 |
|
Hey @kushudai . |
What problem are we solving?
Currently to initiate a consul type you have to do
which is very repetitive, verbose and hurts the eye.
How are we solving the problem?
This PR introduces Bon that automatically generates idiomatic setters for all named fields in a struct.
And the client can do this:
Public Api
correspondant public api(reduced):
cargo public-api diff main..HEAD -sssChecks
Please check these off before promoting the pull request to non-draft status.