Link Search Menu Expand Document

graffiti

HTML/CSS engine for node.js and deno. No electron, no webkit, no servo, all from scratch.

Discord | Quickstart repo


Work in progress, prev version

  • nodejs 15.x, deno 1.8.3 (1.9 is broken)
  • CSS, events, (p)react/vue/svelte support
  • CLI for running *.html files
  • rendering is broken/low-quality, resize is broken
  • WebView is macos only (for now)

Follow me on my twitter for updates.


Usage

# one-shot (takes forever)
npx github:cztomsik/graffiti run <file.html>

# or install locally
npm i github:cztomsik/graffiti
npx graffiti run <file.html>

# or with deno
git clone https://github.com/cztomsik/graffiti
cd graffiti
npm i
deno run -Ar --unstable --no-check lib/cli.js run http://...

Features and limitations

  • low memory footprint
  • JS libraries generally work fine (react, vue, svelte, ...)
  • <script> elements are only evaluated during page-load
  • CSS-in-JS should work fine, @import is not supported
  • flexbox only (block is emulated, inline/float is not supported at all)
  • no process isolation so it's unsafe to use it as a browser

react-calculator

hmr

hackable-tv

Dev setup

  • git clone
  • have nodejs 15.x
  • have rust in PATH
  • (linux-only) have X11 headers apt install xorg-dev
  • npm i
  • npm run build && npm run prepare && node lib/cli.js run <html-file>