-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adjust readme: use zig fetch
in ## How to use
#89
Conversation
Small adjustment to the `README.md`: * As an example on how to use the project provide a simpler example using `zig fetch` * Adjust the existing example for adding the module in the `build.zig` file to have additional information where it belongs and remove the wrap from `pub fn build(b: *std.Build) void {` for easier copying.
}, | ||
} | ||
```sh | ||
zig fetch --save "git+https://github.com/Arwalk/zig-protobuf#v2.0.0" |
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.
Amazing <3
```zig | ||
pub fn build(b: *std.Build) !void { |
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'm hesitant to keep this one for context, the snippet "goes inside the build fn"
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.
No problem :) i will just revert it. I have been overthinking this before, too 😅.
EDIT:
I totally understand where you are coming from @menduz, it is hard to find a good convention for this.
I do not really remember if at first i read it in an article about zig or simply saw it in the zigzap release notes, but i find this to be a good pattern.
So it is either easy to use for people who know the drill and can simply copy and insert, but does not give meaningful context for people who are not that familiar with zig yet
...or it gives additional information to people being not that familiar with the zig build process, but with manually selecting the lines you need to copy over to the build.zig file.
Its the small things haha 🫠
So in the end my conclusion is it is helpful to show pub fn build(b: *std.Build) !void {
at this state of zig i guess ;).
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'm ok with this personally. As stated in #48 we need to make a proper documentation at some point.
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.
Approving, waiting if @menduz has a last opinion to state before merging.
|
Hey folks,
i finally got the time to check out this project :). First of all thanks alot for doing this <3! I am not super experienced with contributing to open source projects, but i want to dive into helping out in some projects and this fits very fitting.
I am working with protobuf at work, too and plan to contribute more frequently. I just need to get into the project.
Lastly as i was using this project just now and realized the
How to use
instructions could be simpler ;), so i thought id give something back immediatly. So here are my 2 cents:Note
Pull Request Description
Small adjustment to the
README.md
:zig fetch
Adjust the existing example for adding the module in the(REVERTED).build.zig
file to have additional information where it belongs and remove the wrap frompub fn build(b: *std.Build) void {
for easier copying 😇WDYT?
Enjoy the rest of your weeks everyone 🍿!