All Projects â†’ twilco â†’ Kosmonaut

twilco / Kosmonaut

Licence: mpl-2.0
A web browser engine for the space age 🚀

Programming Languages

rust
11053 projects
HTML
75241 projects

Projects that are alternatives of or similar to Kosmonaut

Capture Frame
Capture video screenshot from a `<video>` tag (at the current time)
Stars: ✭ 109 (-92.88%)
Mutual labels:  browser
Finicky
A macOS app for customizing which browser to start
Stars: ✭ 2,026 (+32.33%)
Mutual labels:  browser
Seelog
įŽ€å•æ˜“į”¨ æĩč§ˆå™¨åŽžæ—ļæŸĨįœ‹æ—Ĩåŋ—
Stars: ✭ 116 (-92.42%)
Mutual labels:  browser
Instagram Profilecrawl
đŸ’ģ Quickly crawl the information (e.g. followers, tags, etc...) of an instagram profile. No login required!
Stars: ✭ 110 (-92.82%)
Mutual labels:  browser
Browserinterop
Wrapper for Browser JS API for Blazor and JSInterop
Stars: ✭ 112 (-92.68%)
Mutual labels:  browser
Galacteek
Browser for the distributed web
Stars: ✭ 114 (-92.55%)
Mutual labels:  browser
Validatorjs
A data validation library in JavaScript for the browser and Node.js, inspired by Laravel's Validator.
Stars: ✭ 1,534 (+0.2%)
Mutual labels:  browser
Mylittledom
High-level DOM-like terminal interface library
Stars: ✭ 116 (-92.42%)
Mutual labels:  browser
Sielo Legacy
An open source browser made with Qt and WebEngine
Stars: ✭ 113 (-92.62%)
Mutual labels:  browser
Perf Monitor
Performance monitor. Simple UI component that helps you measure performance.
Stars: ✭ 115 (-92.49%)
Mutual labels:  browser
Simple Fs
Handles files on indexeddb like you would do in node.js (promise)
Stars: ✭ 111 (-92.75%)
Mutual labels:  browser
Battery.js
A tiny wrapper for the HTML5 Battery Status API.
Stars: ✭ 111 (-92.75%)
Mutual labels:  browser
Anti Webminer
Anti-WebMiner protects your PC against web cryptocurrency miners (JS scripts like Coinhive executed in the browser) by modifying Windows hosts file
Stars: ✭ 114 (-92.55%)
Mutual labels:  browser
Irodr
RSS reader client like LDR for Inoreader.
Stars: ✭ 110 (-92.82%)
Mutual labels:  browser
Slouch
A JS client for CouchDB that does the heavy lifting
Stars: ✭ 116 (-92.42%)
Mutual labels:  browser
Leash
Browser Shell
Stars: ✭ 108 (-92.95%)
Mutual labels:  browser
Emacs Application Framework
A free/libre and open-source extensible framework that revolutionizes the graphical capabilities of Emacs, the key to ultimately Live in Emacs
Stars: ✭ 1,932 (+26.19%)
Mutual labels:  browser
Vertical Tabs Reloaded
Firefox add-on for arranging tabs vertically
Stars: ✭ 115 (-92.49%)
Mutual labels:  browser
Sushi Browser
Sushi Browser is the next generation browser which mounts the multi-panel and the video support function and so on. Its goal is to be as fantastic as sushi. đŸŖ
Stars: ✭ 116 (-92.42%)
Mutual labels:  browser
Browser Metrics
A collection of metrics tools for measuring performance ⚡ī¸
Stars: ✭ 115 (-92.49%)
Mutual labels:  browser

Kosmonaut banner


Build Status Join the chat at https://gitter.im/kosmonaut-browser/community

Kosmonaut is a web browser engine created to serve as the vehicle for your journey across the world wide web.

The road to the stars is steep and dangerous. But we're not afraid...space flights can't be stopped.

― Yuri Gagarin

What can Kosmonaut do?

So far, not much. Only a very limited subset of CSS is currently supported, so most web pages will not work. However, given very basic HTML and CSS, Kosmonaut does render the right things — see Kosmonaut's rendering of this code, compared with that of Firefox:

Kosmonaut and Firefox rendering HTML and CSS the same, resulting in a picture of some rainbow colored boxes.

Here is a summary of things Kosmonaut can do, things I'm currently working on, and things that are towards the front of the todo list.

  • Parse HTML and small subset of CSS into DOM and rules, cascade CSS and apply to DOM
  • Layout and paint of normal flow, non-replaced block-level boxes.
  • Layout-tree-dump snapshot-based testing and auto-discovering ref-tests
  • Support for arbitrary scale factors (e.g. high-DPI monitors)
  • Text rendering (without actual integration into layout — see next item)
  • Layout of basic non-replaced inline-level content (such as text)

1: Orthogonal flows (see spec) not supported. Mixed writing-mode support in general (including parallel flows) is currently iffy — I recommend simply using * { writing-mode: <val> }. ↩

Project goals

Kosmonaut was created with the intention of learning browser engine development. However, the project has come a little ways now, and I've been thinking about niches I can work towards fitting Kosmonaut into. I've shared some thoughts on potential niches in this issue, and would love to hear your ideas too.

Build and test

Kosmonaut is built with Rust using OpenGL bindings via gl-rs, Glutin for window management and OpenGL context creation, Servo's html5ever and cssparser for HTML and CSS parsing, and various other auxiliary libraries.

To build from source:

  1. Install Rust: https://www.rust-lang.org/tools/install
  2. Install native dependencies, most of which are required for FreeType which Kosmonaut uses for text rendering.
    • Windows 10, MacOS
      • Skip this step (Kosmonaut uses font-kit, which uses the native font APIs for Windows and MacOS).
    • Ubuntu
      • Install the dependencies found in this Dockerfile on your machine (the apt-get install bit).
    • Arch Linux
      • Install the dependencies found in this Dockerfile on your machine (the pacman -Syu bit).
    • For those running on other operating systems, you'll need to install the equivalent packages. I'd love to get more documentation on installation for other systems, so open an issue if you have trouble or if you'd like to share your setup process.
  3. cargo build

To render HTML and CSS with Kosmonaut, either pass files (HTML and optionally CSS):

cargo run -- tests/websrc/rainbow-divs.html

or a URL:

cargo run -- https://twilco.github.io/assets/html/rainbow-divs.html

To run the tests, both unit and layout, execute:

cargo test --all

For layout tests, Kosmonaut transforms the given HTML and CSS into a box tree, lays it out, and dumps it as text. Those text snapshots are verified with insta.

If you need to review / update layout snapshots, it is helpful to install the Cargo insta CLI tool like so:

cargo install cargo-insta

Kosmonaut can also run ref-tests. Ref-tests render two HTML files and compares the result pixel-by-pixel, ensuring they are the same. This is useful in lots of scenarios, such as testing that shorthands render the same as their longhand equivalents.

License and credits

Kosmonaut's current implementation is heavily inspired by Servo, sometimes taking code directly from it. Thus, Kosmonaut is licensed with the Mozilla Public License 2.0.

Kosmonaut also takes inspiration from Robinson. Thanks to mbrubeck for their great series of articles on browser engines.

Finally, Kosomonaut's DOM implementation was taken from Kuchiki and has been slightly modified to fit our needs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].