Get the latest tech news

Forking Chrome to render in a terminal (2023)


der in a terminal January 27, 2023 I 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! Drawing There isn't much you can draw in a terminal, you're guaranteed to be able to render monospace characters in a fixed grid, and that's it.

It was fairly easy back in the single-process days, but nowadays shared memory regions are configured to efficiently render using multiple processes. It defines an IDL for serializing data which supports native handles (i.e. file descriptors, shared memory regions, callbacks), and can be used to generate C++, Java (Android), and JavaScript (DevTools) bindings. Mojo receivers such as our service are part of the native handles we can send between processes, to register the implementation we just need to add it to the BrowserInterfaceBroker, which will get called by the renderer through BrowserInterfaceBrokerProxy:

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Chrome

Chrome

Photo of terminal

terminal

Related news:

News photo

Judge: Google can keep Chrome, must share search data with “qualified competitors”

News photo

Google won't be forced to sell Chrome after judge rules divestment a 'poor fit' in landmark antitrust case

News photo

US Judge says Google can keep Chrome, but 'exclusive deals' are a no-go