Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Macondo

A handmade web browser written in Rust.
No JavaScript. No committees. No bloat.
Named after the town García Márquez built from nothing — a world on its own terms.

Every parser, every layout algorithm, every pixel routine is written by hand.
No HTML parser crates. No HTTP client crates. No JS engine.
Every line is mine.


Philosophy

Modern browsers are built by committees to run the broken web.
Chrome uses a gigabyte of RAM to show you a blog post.
JavaScript was written in 10 days in 1995. We've been paying for it since.

Macondo is built on opposite principles.

Article I
This browser does not patch your mistakes.
If your markup is wrong, it says so — with source location and hints.
There is no silent recovery.

Article II
This browser does not run JavaScript.
Not because it can't. Because it won't.
Interactivity is handled by Rust compiled to WebAssembly, via a DOM ABI I define.

Article III
A site that does not run here is a broken site.
Not an incompatible browser.


Goals

  • Single-digit MB RAM baseline. No multi-process architecture. One process, one framebuffer.
  • Strict markup enforcement. Errors rendered inline with Rust-compiler-quality diagnostics.
  • Flat DOM. Structure of Arrays instead of a pointer-chasing tree. Pre-order traversal is a loop over a Vec.
  • Fixed content model. Every element can contain rich inline text. No tag arbitrarily forbids underlines or spans inside it.
  • Rust as the scripting language. Compile to WASM, run in Macondo. I define the DOM ABI.
  • Every line understood. No magic crates for the core pipeline. Hand-rolled HTTP, parser, layout, renderer.

Architecture

Window (winit + softbuffer)
    └── Renderer           — software rasterizer, writes u32 ARGB pixels directly
        └── Layout Engine  — flat loop over DOM, produces layout boxes + LinkRects
            └── Flat DOM   — Structure of Arrays, pre-allocated, reused across page loads
                └── Parser         — hand-rolled state machine tokenizer
                    └── SIMD Scanner   — AVX2 on x86, scalar fallback on ARM
                        └── TCP Fetcher    — raw std::net + rustls, no reqwest

Current Status

  • Window opens, pixels render
  • Raw TCP + TLS fetch (rustls, no reqwest)
  • HTML tokenizer + parser → flat SoA DOM
  • SIMD-accelerated tag scanning (AVX2)
  • Rich text rendering — bold, italic, underline, per-span color
  • Word wrap and scroll
  • Clickable links — hit-tested LinkRects, full navigation
  • Link styling — blue color, underline, ancestor-stack aware
  • Inline parse error diagnostics with hints
  • RAM counter visible at all times
  • CSS subset (color, font-size, margin)
  • NEON SIMD path for Apple Silicon
  • WASM runtime (wasmi)
  • DOM ABI + macondo-std crate
  • Tabbed UI + URL bar
  • Linux and Windows platform support

Platform targets

Target Status
aarch64-apple-darwin (M-series Mac) working
x86_64-apple-darwin (Intel Mac) working
x86_64-unknown-linux-gnu planned
x86_64-pc-windows-msvc planned

Building

cargo build --release
cargo run

No system dependencies. Font is embedded at compile time.


Crates used

Crate Reason
winit OS window and input events
softbuffer Raw pixel framebuffer access
fontdue Glyph rasterization — pure Rust, no system font renderer
rustls TLS — cryptography is not the problem I'm solving
rustls-native-certs System cert store access

The browser pipeline — parsing, layout, rendering, navigation — is written from scratch. No crate owns that layer.


Influences

  • TempleOS — one person, raw vision, every line owned and understood
  • García Márquez — a complete world built from nothing, on its own terms
  • Ladybird — a browser built in the open, from scratch
  • Servo — proof that Rust can drive a browser engine

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages