News for hackers. Stuff that matters.
Re:A Decade of Slug by tokyovigilante on Tuesday March 17, 2026 @11:43PM (#47421404)
Thanks Eric, much appreciated. How would you compare your approach to something like Vello (https://github.com/linebender/vello)?
Re:A Decade of Slug by elengyel on Wednesday March 18, 2026 @01:37AM (#47421912)
Vello is intended more for general vector graphics and would probably perform better with pictures containing lots of large paths. Slug is designed specifically for rendering glyph-like objects and would perform better with lots of text and icons.
Re:A Decade of Slug by Ono-Sendai on Wednesday March 18, 2026 @04:51AM (#47423244)
I was going to ask if Slug can be used as a general vector renderer. Or does it assume limits on e.g. number of curves/paths per area that are typical of fonts?
Re:A Decade of Slug by kevthecoder on Wednesday March 18, 2026 @05:47AM (#47423573)
Eric answered a similar question on the Discord channel saying Slug is suitable for generic vector graphics. He recommends checking out the demo at https://sluglibrary.com/ (you can cycle through the examples with the space bar).
Re:A Decade of Slug by Ono-Sendai on Wednesday March 18, 2026 @06:08AM (#47423689)
Awesome, thanks.
Re:A Decade of Slug by Lichtso on Wednesday March 18, 2026 @06:12AM (#47423711)
I think it is limited to integral quadratic bezier curves, which is sufficient for text rendering. But general purpose vector graphics almost certainly want rational cubic bezier curves too.
Re:A Decade of Slug by elengyel on Wednesday March 18, 2026 @03:47PM (#47430543)
The Slug Library can convert each cubic curve into a small set of quadratic curves that approximate extremely well.
Re:A Decade of Slug by __tidu on Wednesday March 18, 2026 @01:09PM (#47428370)
im not Eric but: having used vello (when it was in its early stages i "transplanted" it into my game engine), it is quite a beast. its got a multistage compute shader pipeline, and over time im kinda soured on the whole idea

vello will probably do great under very heavy loads but for your average UI or text document? i reckon something far simpler (like slug!) will end up being more efficient simply by avoiding all those shader launches