An open API service indexing awesome lists of open source software.

https://github.com/d0iasm/saba

SaBA: Sample Browser App supporting HTML, CSS and JavaScript
https://github.com/d0iasm/saba

Last synced: 4 months ago
JSON representation

SaBA: Sample Browser App supporting HTML, CSS and JavaScript

Awesome Lists containing this project

README

          

# SaBA: Sample Browser Application

[![Actions Status](https://github.com/d0iasm/saba/actions/workflows/rust.yml/badge.svg)](https://github.com/d0iasm/saba/actions)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/d0iasm/rvemu/master/LICENSE)

Sample Browser Application (SaBA) on a single thread/process. The browser runs on Mac/Linux as a CUI application or on [Wasabi OS](https://github.com/hikalium/wasabi) as a GUI application.

test page on SaBA on Wasabi OS

The book is published on Nov 9, 2024!

[『[作って学ぶ]ブラウザのしくみ──HTTP、HTML、CSS、JavaScriptの裏側』](https://amzn.asia/d/j1XxxsN) is written in Japanese. The book describes how to make your own browser from scratch in Rust. The code used in the book is based on this repository.

[作って学ぶ]ブラウザのしくみ──HTTP、HTML、CSS、JavaScriptの裏側

## Supported Features

It supports sending/receiving HTTP GET request/response, basic HTML tags, basic CSS syntax and basic JavaScript syntax.

- [x] Handle HTTP GET request/response
- [x] Basic HTML tags (html, head, body, h1, h2, p, etc.)
- [x] Basic CSS syntax (background-color, color, display, etc.)
- [x] Basic JavaScript syntax (addition, subtraction, variable, function)

Upcoming features:

- [ ] QUIC (HTTP/3) protocol
- [ ] HTTPS
- [ ] More HTML tags
- [ ] More CSS syntax
- [ ] GUI on Mac/Linux

## How to Run

### GUI Application on Wasabi OS

You may not be able to run via `cargo run` because the target architecture
is different from your environment.
So use a helper script to run the code,

```
$ ./run_on_wasabi.sh
```

### CUI Application on Mac/Linux

For CUI browser on your host computer,

```
$ cargo run --features=cui --bin=saba_cui --no-default-features
```

### GUI Application on Mac/Linux

GUI on Mac/Linux is not supported yet.

For GUI browser on your host computer,

```
$ cargo run --features=gui --bin=saba_gui --no-default-features
```