Stormlicht is an experimental browser engine written from scratch.
If you want to follow the development, you can visit #stormlicht:matrix.org
I strive for Correctness, Performance and Safety, in that order.
This is also a "for fun" project, so I do try and implement as much of the functionality as possible without relying on third party crates. The engine implements its own font rendering, http stack and image parsing, among other things.
Despite being a "hobby project", Stormlicht is making good progress and has already helped fix bugs in web specifications and implemented WPT tests.
Rendering the Acid1 test | Reference Rendering (Mozilla Firefox 122.0) |
---|---|
Stormlicht uses the latest nightly compiler version. First, install the rust compiler1 , then switch to nightly using
rustup default nightly
After installing rust, run the following commands to start the python build script
pip install -r requirements.txt
./stormlicht.py run
During debugging, you can use the RUST_LOG
environment variable
to set the log level. Refer to the documentation of env-logger for more complex log syntax.
For example:
# Log "debug" and above
RUST_LOG=debug ./stormlicht.py run
Available levels are trace
, debug
, info
, warn
and error
, in ascending order.
The default log level is info
Set RUST_BACKTRACE=1
to enable backtraces in case of a panic.
Testing the browser inside Miri can help detect instances of undefined behaviour. To use miri, execute the following:
rustup toolchain install nightly --component miri
rustup override set nightly
./stormlicht.py run --miri
./stormlicht.py test --miri
This project is inspired by Andreas Kling/the Ladybird Browser
Mozilla's Servo and WebKit provided some good ideas.