explaingit

codymullins/starling

16C#Audience · developerComplexity · 5/5LicenseSetup · moderate

TLDR

Starling is a full web browser engine written from scratch in C#/.NET, covering HTML parsing, CSS, layout, painting, networking, and a JavaScript engine that passes roughly 81% of a standard compatibility suite and can render real websites.

Mindmap

mindmap
  root((Starling Browser))
    Core engine
      HTML parser
      CSS and layout
      Paint to screen
      JavaScript engine
    Networking
      HTTPS connections
      Compressed responses
      Cookie handling
    Desktop UI
      Avalonia cross-platform
      Developer tools
      Tabs
    Headless mode
      Screenshot from URL
      CI automation
      No window needed
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Use Starling's headless mode to capture PNG screenshots of any URL or local HTML file from the command line for automated testing or visual regression checks.

USE CASE 2

Study how each major browser component is built in a managed language by reading the HTML parser, layout engine, and JavaScript interpreter source code.

USE CASE 3

Run real websites through Starling to find rendering differences and contribute patches that improve its JavaScript compatibility test pass rate.

Tech stack

C#.NETAvaloniaImageSharp

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the .NET SDK and a free community license for the ImageSharp graphics library before building.

Use and redistribute freely, including commercially, as long as you keep the copyright notice and license text.

In plain English

Starling is a web browser engine built entirely from scratch in .NET (C#), without reusing any code from Chromium, Firefox, or Safari. The project exists to test whether a browser can be written in a managed language (one that handles memory automatically, like C# or Java) rather than a lower-level language like C++ or Rust, which is the conventional approach for browser projects. The README describes this as an open question the author wanted to answer by actually building it. The engine covers the major components a browser needs: it can parse HTML, build a document structure (called a DOM), apply CSS styles, compute page layout, and paint the result to the screen. Networking is also handled natively, including encrypted HTTPS connections, compressed responses, and cookies. A JavaScript engine is included and currently passes roughly 81% of a standard compatibility test suite, with an alternative JS engine available for higher compatibility when needed. Real websites that rely on JavaScript frameworks can render end-to-end, as shown in the README screenshot of a live site. The desktop interface is built with Avalonia, a cross-platform UI toolkit that works on Windows, Mac, and Linux. It includes browser controls, developer tools panels, and tabs. A headless mode is also available, which lets you point the engine at any URL or local HTML file from the command line and get a PNG image back without opening a window. This makes it useful for automated testing or screenshot generation. The longer-term motivation behind the project is to make WebAssembly a first-class part of the browser rather than something that runs as a guest behind a JavaScript bridge. The author treats earning parity on real websites as the prerequisite before pursuing that goal. Building requires the .NET SDK and a free community license from a third-party graphics library called ImageSharp that the paint system uses. The project is under a BSD 2-Clause license.

Copy-paste prompts

Prompt 1
I want to use Starling in headless mode to screenshot a list of URLs in a CI pipeline. Show me the command-line syntax and how to integrate it into a GitHub Actions workflow.
Prompt 2
Help me understand how Starling's CSS layout engine computes element positions. Which classes handle the box model, floats, and flexbox?
Prompt 3
I want to contribute to Starling's JavaScript engine. How do I run the compatibility test suite locally and identify which failing tests are easiest to fix first?
Prompt 4
Walk me through how Starling handles an HTTPS request end-to-end, from DNS resolution to decrypting the TLS response and parsing the HTML.
Open on GitHub → Explain another repo

← codymullins on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.