Giter VIP home page Giter VIP logo

moon's Introduction

Moon

A hobby web browser developed from scratch

MIT License By Vietnamese

What is this?

This is a web browser developed from scratch using Rust. I created this project to practice my Rust skills as well as to learn how the browser works.

To fit with the "make from scratch" spirit, I'll limit the use of external libraries as much as possible.

Current status

Currently, the browser is able to render block layout! I'm working on supporting other types of layout & text-rendering. Here's a comparison with Firefox rendering. (Moon is on the left, Firefox is on the right).

Wanna try it out?

Here are the steps to try it out if you are interested:

  1. Clone the repository.
  2. Run cargo make example and wait for the code to compile & execute.
  3. Open image.png to see the output.

Refer to the Makefile.toml file for more info.

Requirement: Please refer to the proper Dockerfile in /docker for more information.

Tested on: Ubuntu 18.04

Features

Bold text is what I'm working on

  • ๐Ÿ”Œ DOM API
  • ๐Ÿ“ HTML Parsing
    • HTML tokenizer
    • HTML dom tree builder (85% specs)
  • ๐Ÿ”Œ CSSOM API
  • ๐Ÿ“ CSS Parsing
    • CSS tokenizer
    • CSSOM parser/tree builder
  • ๐Ÿ“ Style
    • CSS cascade
    • Style computation
    • Render tree
    • Selector matching
  • ๐ŸŽด Layout process
    • Box model
    • Box tree generation
    • Line fragmentation
    • Layouts
      • Flow (Block and inline)
      • Flex
      • Grid
  • ๐ŸŽจ Rendering
    • Display list
    • GPU rendering
    • Text rendering
  • ๐ŸŒŽ Networking
    • URL parsing
    • DNS resolving
    • DNS caching
    • HTTP/HTTPS
  • ๐Ÿ–ผ๏ธ Media
    • ๐Ÿ–ผ๏ธ Image rendering
      • JPG
      • PNG
      • GIF
    • ๐ŸŽฌ Video playing
      • MP4
      • WebM
    • ๐Ÿ”ˆ Audio playing
      • MP3
      • WAV
  • JavaScript

Blog posts

I write about what I learn from this journey on my blog (order by latest):

Browser from Scratch: Layout

A quick look into how the browser layout process works. - Read more

Browser from Scratch: CSS parsing & processing

A brief history of CSS & how browser process CSS values - Read more

Browser from Scratch: HTML parsing

Since I have foolishly made a promise with the first three words in the name of this series, let's build an HTML parser from scratch. - Read more

Browser from Scratch: DOM API

One of the main building blocks of the HTML rendering process is the DOM API. Before a browser can render the HTML document, it needs to parse the document content into a tree structure called the DOM tree. In this post, I'll break down my experimentation in building a DOM API with Rust. - Read more

Browser from Scratch: Introduction

This is the start of Browser from Scratch series, created to help me (and probably you too) to learn more about how a browser works by building one! - Read more

Author

License

moon's People

Contributors

zerox-dg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.