How d0iasm/sababook works
Project type and purpose
· This is an educational browser engine called “SaBA” (Sample Browser Application), implemented in Rust and organized as a sequence of chapters (ch0–ch7). Each chapter incrementally adds functionality: from URL parsing (ch2), to HTTP (ch3), HTML parsing (ch4), CSS styling (ch5), GUI (ch6), and JavaScript execution (ch7).
· It is akin to a compiler or interpreter pipeline combined with a rendering engine and minimal UI layer, rather than a typical web-app frontend/backend.
File structure
· Top-level directories ch0–ch7 each contain a “saba” Cargo project.
· Within each:
– The “saba_core” sub-crate holds the core browser engine logic (URL handling, HTTP client interface, parsers, DOM, CSSOM, layout, page rendering, JS).
– The “net/wasabi” sub-crate implements a lightweight HTTP client backend.
– In later chapters (ch6+), an additional “ui/wasabi” sub-crate provides a GUI frontend.
· Build scripts: run_on_wasabi.sh, rust-toolchain.toml.
· Tests and sample HTML files exist to illustrate functionality.
README
· Confirms the chapter mapping and core purpose: to show how a browser works under the hood.