4a002763419a34d61dcbb1f415821b83b9bf8ddc
master
aa24df42183ad415d10bc0a33e6238c437fc0f59
WARNING This project is actively in work!
HEAD
usually works but it may be broken or produce nasty results.
This repo holds my Zig code for the browser implemented in Web Browser Engineering.
You'll need Zig installed.
Clone the project
git clone https://github.com/braheezy/zibra.git
To build the project, run:
zig build
cp zig-out/bin/zibra .
zibra
(optionally) takes one URL and displays the result in a window:
zibra https://example.org
Run without a URL for a default HTML.
zibra
is small but supports the basics:
file://
URIsdata:
URIs&
→ &
(ampersand)<
→ <
(less than)>
→ >
(greater than)"
→ "
(quotation mark)'
→ '
(apostrophe)­
→
(soft hyphen)Connection: keep-alive
headerCache-Control
headerContent-Encoding: gzip
and Transfer-Encoding: chunked
headers<b>Bold</b>
<i>Italic</i>
<big>Larger text</big>
<small>Smaller text</small>
<sup>Superscript</sup>
<h1 class="title">Centered title</h1>
: An h1
with class
set to title
will be centered<abbr>Abbreviations</abbr>
<pre>Preformatted text</pre>
: Including bold and italic variants<html>
, <head>
, and <body>
tags<img />
, <br />
, and <input />
There's more Zig commands:
# build and run
zig build run -- https://example.com
# Run tests
zig build test
To test chunked gzip responses, run gzipServer.py
locally.