Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

556 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goosie

Goosie is an experimental web browser engine written in Go. It implements its own HTML/CSS pipeline, layout engine, display list, and rasterizer—without WKWebView, WebView2, CEF, or another embedded browser.

Fyne provides the desktop window and input handling; page rendering is done by Goosie.

Goosie is under active development and supports a subset of the web platform. See Supported Web Platform for current coverage.

Features

  • Asynchronous HTTP navigation with cancellation and resource limits
  • Custom DOM, CSS selector, style, and layout engines
  • Block, inline, flex, grid, form, and table layout
  • Pure Go CPU rasterization with retained display lists and dirty-region updates
  • JavaScript through Goja, with custom DOM and browser API bindings
  • Tabs, history, bookmarks, profiles, local storage, cookies, and cache
  • Built-in console, DOM inspector, network log, and storage tools
  • GUI and headless PNG rendering

Screenshots

All of the following pages are rendered entirely by Goosie's own layout engine and CPU rasterizer—no embedded browser is involved.

Long-form article rendering Grid layout demo
Long-form article with nested sections CSS Grid layout
CSS styling demo Table layout
CSS selectors, cascade, and styling HTML table layout

Quick start

Goosie requires Go 1.24.9 or newer.

git clone https://github.com/vyquocvu/goosie.git
cd goosie
go mod download
go run ./cmd/browser

To open a page at startup:

go run ./cmd/browser -url=https://example.com

On Linux, install the native libraries required by Fyne first:

sudo apt-get install libgl1-mesa-dev xorg-dev

Build a binary with:

make build
./bin/goosie

For a smaller release binary, use the size-optimized target. It keeps the existing symbol/debug stripping, removes local path metadata with -trimpath, and clears the Go build ID for reproducible, slightly smaller output:

make build-small
./bin/goosie-small

If you need the smallest distributable file and accept the trade-offs of packed executables (slightly slower startup and occasional antivirus false positives), install UPX and run:

make build-small-upx

Headless rendering

Capture a website with the headless-tag browser build:

go run -tags headless ./cmd/browser -headless \
  -url=https://example.com \
  -screenshot=screenshot.png
# or build it first
make build-headless
./bin/goosie-headless -headless -url=https://example.com -screenshot=screenshot.png

The default GUI build intentionally leaves out Fyne's test driver to keep the binary smaller; use the headless-tag build above for URL screenshots.

Render local HTML or standard input directly to PNG:

go run ./cmd/headless -html=page.html -output=page.png
# or
echo '<h1>Hello, Goosie</h1>' | go run ./cmd/headless -output=page.png

Use -width and -height to change the headless viewport.

How it works

HTTP/HTML
  → DOM parser
  → CSS cascade and computed styles
  → layout and fragments
  → display list
  → CPU rasterizer
  → Fyne window or PNG

Core code lives under internal/; runnable programs live under cmd/.

Testing

go test ./... -short                         # quick suite
go test ./...                                # full local suite
go test -tags=e2e ./test/e2e                 # end-to-end tests
go test ./internal/renderer/layoutgolden/    # layout snapshots

The end-to-end suite requires Playwright and network access. Install Playwright with make install-playwright.

Documentation

License

MIT

About

A web browser implement by Go

Topics

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages