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 the vello_toy crate #834

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add the vello_toy crate #834

wants to merge 8 commits into from

Conversation

LaurenzV
Copy link
Contributor

@LaurenzV LaurenzV commented Mar 5, 2025

This PR proposes adding a new crate called vello_toy, containing a number of small binary crates that build on top of the other ones. Currently, it only contains a single tool debug that allows to visualize the intermediate stages of sparse strip rendering, but I think there are a couple of other binary crates that could be added in the future (another idea of mine being for example building a very simplistic SVG renderer on top of usvg).

The current tool I added serves two purposes:

  • It allows newcomers to experiment with and visualize the various stages, which makes it easier to understand how everything works.
  • It allows for debugging issues in specific parts of the pipelines more easily.

I know there could be more documentation on what exactly each of the parameters mean and how to use them, but since it's mainly for development purposes I think this should be enough. To demonstrate this with an example:

cargo run --bin debug -- --path "M 5 5 L 40 23 L 7 44 Z"  --stages ls,ta,ti

grafik

cargo run --bin debug -- --path "M 5 5 L 40 23 L 7 44 Z"  --stages ls,ta,ti,sa,s

grafik

cargo run --bin debug -- --path "M 5 5 L 40 23 L 7 44 Z"  --stages ls,ta,ti,sa,s,wt

grafik

@LaurenzV
Copy link
Contributor Author

LaurenzV commented Mar 5, 2025

If we don't want to create a separate crate I'm open for that, but I'm not sure if something like this is worth putting in examples, maybe it is? Another disadvantage of that would be that vello_common would require a dev dependency on clap and svg.

@grebmeg
Copy link
Contributor

grebmeg commented Mar 5, 2025

That sounds like a great idea! I really liked your debug example in the cpu-sparse-experiments repo and actually started building a web debugger on top of it (attached a video). I wanted to share it earlier but didn’t get the chance. Initially, I thought it might be a good fit as one of the examples. What do you think about the web debugger? Would it be useful for you as well?

sparse-strip-web-debugger.mov

@LaurenzV
Copy link
Contributor Author

LaurenzV commented Mar 5, 2025

Ohh yeah, this looks pretty neat! :) Maybe that would be a better way of implementing this, since it's interactive.

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.

2 participants