Skip to content
/ ferus Public
forked from ferus-web/ferus

A toy web engine written in Nim

License

Notifications You must be signed in to change notification settings

neroist/ferus

 
 

Repository files navigation

Ferus -- a prototype web engine written in the Nim programming language

Ferus is a small web rendering engine that is 100% independent (not based on WebKit, Blink or Gecko), fast, and (hopefully) secure. It aims to stand as an alternative to more popular web engines by providing full compatibility to how they work.
Ferus also stands for "Fast Engine (for) Rendering Ur Site", if you'd prefer that. :)
It currently stands at 3047 lines of code, and has process isolation, simple compositing, a WIP layout engine, an incomplete DOM and HTML/CSS parsers ready.

Why? (Why not just make a WebKit/Blink browser?)

There's plenty of reasons.

  • I dislike the Chromium monopoly (despite using a Chromium based browser) and I believe there should always be an alternative standard to everything, which invites community participation.
  • This web engine aims to have as less code as humanly possible, in order to reduce the attack surface.
  • Be extremely customizable. Seriously. The only thing that I dislike about Chromium feature-wise is the lack of customizability of UI via CSS.
  • A side-aim, if you can call it that, is to increase the popularity of the Nim programming language. Seriously, it's awesome!

How much of the web can it render right now?

The answer is: no website. All websites are written either
a) in an extremely shoddy fashion by a developer who's salary is a bag of puff corns
b) some atrocious JavaScript (bleh) framework that generates HTML
Only simple HTML documents that are written 100% accurately following all specs can render as of right now. There are plans of plugging libtidy into the ferushtml pipeline soon so that basically the worst-of-the-worst sites
can load.

Contributions

Please read the best code practices in the documentation and follow basic human etiquette. Helping out is more than appreciated!

You can join the Discord server for more in-depth discussion on Ferus: https://discord.gg/Cz5uRWsR
If you don't like Discord (for obvious reasons) then you can just make issues.

Aim

  • To work as a usable web engine/browser for my personal usage.
  • To do what every other engine isn't doing, that is, full utilization of system cores (not as in Chrome's memory hog, but lenient utilization of cores). All modern web engines were built with 1 or 2 cores in mind, Ferus will use a good parallelization library for Nim called weave for parallelizing everything.

Roadmap (P = Partially done)

  • Basic HTML parser
  • Basic CSS parser
  • Basic compositing
  • Process isolation and sandboxing (Chromium style sandboxing)
  • HTML5 (WHATWG) & CSS3 support
  • Layout
  • Hardware accelerated video decode
  • MV2-3 support (MV2 will never be deprecated here, once implemented)
  • Windows and MacOS builds
  • BSD-family builds, should be trivial
  • Android and iOS builds, probably will be hellish
  • ...Nintendo Switch builds, I suppose...?

When will it be complete?

Like all free and open source software, there is no set date for release 1.0 However, once you are able to open up web pages, please, for the love of God himself, do NOT go log into your bank account with Ferus.

Okay, but how do I run it?

Ferus does not have any proper releases yet, just random tomfoolery and testing is currently going on. To try it out, execute the following (tested on Linux only, because Windows sucks for anything besides gaming). Anything beyond Nim 1.6 should do. Nimble is also required.

$ git clone https://github.com/xTrayambak/ferus.git
$ cd ferus
$ nimble install # Ignore the error
$ nimble productionBuild # Package maintainers: use this, there is debugBuild, but it is only for Ferus developers and it produces bloated binaries
$ cd bin
$ ./ferus

To run Ferus in Docker:

$ docker-compose build
$ docker compose run ferus /bin/bash
$ nimble install # Ignore the error
$ nimble productionBuild
$ cd bin
$ ./ferus

Attributions

SHA256 implementation

About

A toy web engine written in Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Nim 85.8%
  • HTML 13.8%
  • Other 0.4%