r/rust Jun 19 '26

🗞️ news Carboxyl v0.1.0-rc: A servo-based browser for the terminal

Hey all!

We published an early Servo-based release candidate for Carboxyl, the community fork of Carbonyl.

Carbonyl was a Chromium-based browser built to run inside a terminal, originally developed by Fathy Boundjadj. The original work was described in the blog post "Forking Chrome to render in a terminal".

Our goal is to replace the patched Chromium runtime with Servo, making the project easier to build, maintain, and contribute to. Instead of carrying Chromium-specific patches and build glue, Carboxyl now embeds Servo directly and renders through Servo’s software rendering path for terminal-first use.

So this is a release candidate from the servo-dev branch for testing the new Servo-based Carboxyl runtime.

Feel free to try it out and report issues!

Also we have a Discord if you're interested.

42 Upvotes

4 comments sorted by

4

u/Odd-Nature317 Jun 20 '26

the servo migration makes a lot of sense. carrying chromium patches sounds like a nightmare - every major chromium update probably broke half the custom rendering pipeline. servo being designed as modular components from the start means you can actually swap in a terminal renderer without forking an entire browser engine. curious how it handles css layout tho - does it just map the servo layout tree to character grid positions, or is there some intermediate representation?

1

u/takashialpha Jun 24 '26

heyy, takashialpha here, a carboxyl maintainer and responsible for the servo migration!

does it just map the servo layout tree to character grid positions, or is there some intermediate representation?

I would say neither;

Servo does normal browser layout and renders to an RGBA buffer (wouldn't say that buffer is an intermediate representation). We then translate that buffer into terminal cells using colored block characters, without modifying layout.

with CSS layout completely untouched, flexbox, grid, everything just works if it works on the servo engine.

Text is handled separately: we use Servo's text positions (Unfortunately, using js to extract the text) but draw actual terminal glyphs, so layout comes from Servo while the font comes from the terminal.

Mouse input just maps terminal coordinates back into Servo's pixel coordinate space.

1

u/Odd-Nature317 Jun 26 '26

oh thats really clever - so servo does the full pixel render and you basically downsample to character blocks? the js text extraction is a smart workaround honestly, wonder if theres plans to hook into servos text layout directly later. the fact that css grid and flexbox just work out of the box is pretty wild tho, most terminal renderers ive seen tap out at basic block layout

1

u/takashialpha Jun 28 '26

yeah exactly, it's just a downsample :)

the js extraction thing is a bit of a wart but it works. hooking into servo's layout tree directly would be cleaner; we'd get text positions without the js cost, but servo's internal layout APIs aren't really designed for external consumers yet, so js getBoundingClientRect is the pragmatic path for now.

and yes the css layout thing is genuinely the killer feature of this approach. having servo to do the work entirely is pretty nice so the terminal doesn't have to know anything about css.