Building Carbonyl: A Chrome Fork for Terminal Web Rendering
By
riddley
8mo ago· 20 min readen
100/100
Golden Brown
Bagelometer↗
Pulled from the oven just right. Trustworthy, fact-dense, deeply satisfying.
Score100Typehow-toSentimentneutral
Summary
The article introduces Carbonyl, a web browser that forks Chrome to render HTML content directly in terminal environments. It demonstrates how to convert Chrome's rendering output into terminal-compatible graphics using ANSI escape codes for color and cursor positioning. The technical guide shows Rust code examples for handling pixel rendering, color management, and cursor movement to display web content in terminal interfaces.
Key quotes
· 4 pulledI wrote about forking Chrome to turn HTML to SVG two months ago, today we're going to do something similar by making it render into a terminal.
Let me introduce you to the Carbonyl web browser!
Let's hook html2svg's output into a Rust program:
fn move_cursor((x, y): (usize, usize)) { println!("\x1b[{};{}H", y + 1, x + 1) }
January 27, 2023

