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

doc: how to run examples #475

Closed
wants to merge 1 commit into from
Closed

doc: how to run examples #475

wants to merge 1 commit into from

Conversation

coolaj86
Copy link

Newbie Rusties, Mob programming live right now to figure this out:
https://www.youtube.com/watch?v=xu2r8tuUs6k

@mrobinson
Copy link
Member

mrobinson commented Aug 1, 2023

First off, thank you for the contribution.

This is the standard way of running examples in a rust project, so I'm inclined to close this. It would really only be useful if it differed somehow from a typical rust project.

@mrobinson mrobinson closed this Aug 1, 2023
@coolaj86
Copy link
Author

coolaj86 commented Aug 2, 2023

Most projects definitely do not have cargo run --example print-rcdom.

There's no way anyone would know to do this to check that things build correctly without being familiar with this project.

Nor do most devs even know that git submodules exist (all that mono repo hype).

And giving someone the copy / paste for "how to download, install, and experience this" is just a nice thing to do.

This is project is very niche and many of the people who find it are going to be non-experts, just experimenting with things (by definition, since the majority of experts already have solutions that work for them).

So although, yes, obviously if you know you know, I think there's a lot of value here at no tangible cost - helps some, hurts none.

And we did have experienced Rust developers in our group. It still took a bit to figure out what to do.

That said, at the very least there's some documentation here for someone coming across this in the future.

@mrobinson
Copy link
Member

There are instructions for initializing the git submodules in this repository in the top-level README (https://github.com/servo/html5ever#working-on-html5ever). Perhaps this could be made more prominent, but in general I think we shouldn't be repeating ourselves too much in the documentation. In addition, it's not very scalable for every Cargo-based project to document how to use Cargo (https://doc.rust-lang.org/cargo/commands/cargo-run.html#examples).

@mrobinson
Copy link
Member

That said, a line showing how to run all examples in the top-level README is probably fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants