Skip to content

Conversation

@DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Nov 21, 2025

This is an initial implementation of Vello API, our abstraction between Vello CPU and Vello Hybrid (and also maybe Vello Classic).

A few notes:

  • This is designed to be combined with something like a "Parley Draw", i.e. it's designed to allow external glyph rendering.
  • The design is fully no_std + alloc compatible.
  • Vello API does not try to abstract away the unabstractable, e.g. handling external textures.
  • The multi-threading design is something which will need more thought. I think we're likely to end up with an explicit CommandEncoder like API, similarly to that seen in wgpu.

Importantly, this PR is intentionally not making internal changes to the extant crates, and instead is only adding new API surface for the abstraction. The plan would be to make these changes only once this has landed, to limit merge conflicts as much as possible.

I think it's valuable to get something landed here, whether or not it ends up being the final state. The main advantage there is that it allows porting tests in a piecemeal fashion, as well as making changes to the APIs of Vellos CPU and Hybrid (without creating a massive merge conflict headache). This PR is currently scoped small enough to be easily revertible if we want to go a different direction.

A previous version of this PR used the renderer abstraction for the tests. That code is now gone as it wasn't landable, but can be seen in b200d5e and earlier.

@DJMcNab DJMcNab force-pushed the api-design branch 2 times, most recently from b200d5e to a48f6c5 Compare November 26, 2025 18:45
@DJMcNab DJMcNab changed the title Implement an initial version of Vello API, and implement most of the sparse strip tests using it Implement an initial version of Vello API Nov 26, 2025
Comment on lines +11 to +49
// TODO: Maybe a better type is `atomicow::CowArc<'static, str>`
pub label: Option<&'static str>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://lib.rs/crates/smol_str is another option here (Winit depends on it)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering how much effort it would be to coordinate a UI-ecosystem-wide change to one of the other mini-string crates. IIRC some of them have more features.

Maybe at next RustWeek.

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.

4 participants