linebender / linebender/vello

Eliminate `vello_common` dependency from `glifo`

Open
#1,719 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependencies
Dominant language
Rust
Stars
4.3k
Forks
300
Avg merge
2d 13h
Merged PRs (30d)
61

Description

Parley Draw currently depends on `vello_common` for the `Pixmap` type. It uses this as a representation for bitmap data (including in the public API), and also for reading PNG files.

This is not ideal as it couples `glifo` version to specific vello versions. Which will mean publishing a new version of `glifo` every time we publish vello (sparse strips), and also make it awkward to use `glifo` with main-branch versions of vello.

I can think of a few ways to eliminate this dependency:

- Duplicate (copy-paste) `Pixmap` into `glifo`
- Include a simplified version of `Pixmap` in `glifo`
- Move `Pixmap` into a shared crate (peniko? a new crate?)
- Use simple types (e.g. `Vec`) to represent bitmap data in `glifo`

What do other people think the best way to deal with this is? (CC: @grebmeg @valadaptive @taj-p @LaurenzV)

---

Note: Parley Draw also pulls in `vello_common` as part of `vello_cpu` when that feature is enabled. But that dependency is optional and doesn't impact anyone who doesn't have the `vello_cpu` feature enabled (and therefore not problematic in my opinion).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing glifo's public Pixmap API and its PNG-reading code, then compare the dependency-removal options described in the issue. Done means glifo no longer depends on vello_common while its bitmap representation and PNG support remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.