This is an experiment to see if an agent using LLMs, could build a functional browser by itself with minimal guidance, and without using any 3rd party libraries.
- A binary that can render a .html file to the display
Platform:
- Linux/X11 (requires an X server and
$DISPLAY). - Windows 10 (1703+) or Windows 11
- macOS 11+ (double-check)
This project uses system libraries/frameworks via FFI.
- Linux/X11: X11/Xft/Cairo, librsvg, libcurl, libpng, libjpeg-turbo, libwebp.
- Windows 10/11: WinHTTP, WIC (PNG/JPEG/WebP), Direct2D/DirectWrite. If WebP decode fails, install Microsoft "WebP Image Extensions".
- macOS: system frameworks (CoreGraphics/CoreText/ImageIO/QuickLook).
Arch Linux (Wayland via XWayland):
sudo pacman -S --needed xorg-xwayland libx11 libxft cairo librsvg curl libpng libjpeg-turbo libwebpUbuntu (Wayland via XWayland):
sudo apt-get update
sudo apt-get install -y xwayland libx11-dev libxft-dev libcairo2-dev librsvg2-dev libglib2.0-dev libcurl4-openssl-dev libpng-dev libjpeg-turbo8-dev libturbojpeg0-dev libwebp-devRHEL (Wayland via XWayland):
sudo dnf install -y xorg-x11-server-Xwayland libX11 libXft cairo librsvg2 libcurl libpng libjpeg-turbo libwebpIf you run an Xorg session (not Wayland), install an Xorg server package instead of XWayland (xorg-server / xorg / xorg-x11-server-Xorg).
# Built-in "Hello World"
cargo run
# Render a local file
cargo run -- test-file.html
# Render a URL
cargo run -- https://example.com
# Save a PNG screenshot and exit once the page is ready
cargo run -- test-file.html --screenshot out.png
# Headless mode (Linux/X11: still requires an X server, e.g. via xvfb-run)
cargo run -- --headless test-file.html --screenshot out.png<target>(optional): path to an HTML file, or anhttp(s)://...URL.--screenshot <path>/--screenshot=<path>: write a PNG screenshot and exit.--headless: don't map a window; useful for automation/tests.--width <px>/--width=<px>: initial viewport width in CSS pixels (default: 1024).--height <px>/--height=<px>: initial viewport height in CSS pixels (default: 768).OAB_SCALE(env): override the DPI scale factor (e.g.1.25or125%).
cargo test
# If you don't have an X server (Linux CI/headless), use Xvfb:
xvfb-run -a cargo testRender regression tests compare screenshots to per-platform baseline PNGs in tests/cases/.
OAB_RENDER_TEST_MIN_SIMILARITY(env): minimum required similarity ratio (default:0.95; set1.0for exact match).