Arix is a web browser engine written in Zig for the purpose of high performance and low memory usage.
The project currently includes:
- HTML parser
- CSS engine: parsing, selector matching, cascade, and computed styles
- Text decoding and a basic DOM
- Fonts: loading, matching, and text shaping
- Layout: basic blocks and text wrapping
- Paint: backgrounds, borders, and text
Arix is still under active development. Styling, layout, and painting are currently partial and incomplete. Networking and the JavaScript engine are not yet implemented.
Requires Zig 0.17.0.
Ensure that Python 3 is on your machine.
zig build example:<name>See examples.
Tests cover HTML and CSS parsing, text decoding, DOM, styles, font matching, shaping, text measurement, line breaks, layout, and painting. HTML parser's behavior is tested against the html5lib test suite.
Build and run the test:
zig build testAdd -Ddebug=true for debug output and --summary all for a full summary.
Use -Dtest-filter=<name> to filter tests.
For example:
zig build test --summary all -Dtest-filter=tokenizerCompiled in ReleaseFast mode and run benchmarks:
zig build bench -- [--iterations N] FILE.html FILE.css ...or you can directly use commands in Makefile:
make bench_html
make bench_cssSee CONTRIBUTING.md