Non-visual, spec-driven browser runtime — execute JS-heavy pages without rendering a pixel
  • TypeScript 69.7%
  • JavaScript 15.2%
  • HTML 12.1%
  • Rust 2%
  • Python 0.8%
  • Other 0.2%
Find a file
Glow a261588078
Some checks failed
/ test (push) Has been cancelled
React Compatibility / react-compat (push) Has been cancelled
feat(native): mmap-dom FFI loader + zero-copy View Layer (Sprint 23.2)
JS-side bindings for libmmap_dom.so with full DOM §4/§4.5 spec coverage.
View Layer reads PackedNode fields directly via DataView — zero-copy.

## Bug Fixes
- FFI: store Arena as Vec<(RawFd, Arena)> keyed by fd, not pointer
  (Rust: cast ptr→RawFd was truncation; FD lookup is correct model)

## src/native/mmap-dom.ts — FFI Loader
- Bun:FFI dlopen for libmmap_dom.so
- Resolves library path (process.cwd/native/..., import.meta.dir)
- FFI_SYMBOLS: mmap_dom_create/close/alloc_node/node_count/version/default_size/layout_version
- TypeScript enums mirror Rust constants:
  - NodeKind (Element=1, Attr=2, Text=3, ..., Document=9, DocumentType=10)
  - NodeFlag (IsConnected, IsContentEditable, IsHtmlElement, IsSvgElement, ...)
  - NodeField offsets (KindAndFlags, Parent, FirstChild, LastChild, ...)
  - HeaderField offsets (Magic, Version, VersionCounter, NodeCount, ...)
  - StringTableField (SECTION_BASE, OFFSETS_BASE, LENGTHS_BASE, DATA_BASE)
- FfiError enum: Ok=0, OutOfMemory=-1, InvalidArg=-2, Panic=-3, NotFound=-4

## src/native/mmap-view.ts — Zero-Copy View Layer
- MmapDomView wraps SharedArrayBuffer
- Reads PackedNode via DataView (O(1) cache-line access)
- Spec-aligned methods:
  - getKind: W3C nodeType (DOM §4)
  - parentNode/firstChild/lastChild/nextSibling/previousSibling (DOM §4)
  - childCount/childAt (DOM §4.5)
  - getTagName/getLocalName (DOM §4.5)
  - getNamespaceURI (DOM §4.5)
  - getData/textContent (DOM §4.4 + §4)
  - getAttribute (DOM §4.10)
  - getString (zero-copy TextDecoder)
  - describe/dumpSubtree (debug)
- Atomic version counter for mutation visibility
- Cached node count (invalidated on version bump)

## Spec Coverage
- DOM §4 Node interface (parent, children, siblings, nodeType)
- DOM §4.5 Element interface (tagName, localName, namespaceURI)
- DOM §4.4 CharacterData (data/textContent)
- DOM §4.10 Element attributes (getAttribute with inline attrs)
- DOM §4.1 Document (nodeType=9)
- DOM §4.3 DocumentType (nodeType=10)
- W3C DOM4 §5 Node.nodeType values

## Tests: 31/31 passing
- FFI: library path, default size, layout version, create/close, node_count,
  alloc_node (Document kind=9), version increment, error paths
- View: layout validation (magic, version), all DOM §4/§4.5 methods,
  text content concatenation, subtree dumping, spec constant matching
- DOM §4 spec methods: parentNode, firstChild, lastChild, prev/nextSibling,
  childCount, childAt
- DOM §4.5 spec methods: tagName, namespaceURI, getAttribute
- DOM §4.4 spec methods: data, textContent
- W3C NodeKind enum: Element=1..DocumentFragment=11

Spec: https://dom.spec.whatwg.org/

Refs: Sprint 23.2 of radikale Performance-Plan
2026-06-24 08:40:57 +00:00
.forgejo/workflows React 19 compatibility: Forms + Concurrent polyfills + Integration tests 2026-06-17 16:43:33 +00:00
bench feat: Sprint 8 — Performance Pipeline, Resource Filter, Benchmarks (closes #59) 2026-06-18 13:44:50 +00:00
benchmarks React 19 compatibility: Forms + Concurrent polyfills + Integration tests 2026-06-17 16:43:33 +00:00
corpus Sprint 19 — Issue #84: NameTooLong → Blob-URL-Fallback (Memory-Only) 2026-06-18 20:50:38 +00:00
docs feat: Network Request Manager mit Request↔Response-Matching, Interceptors, Events, Body-Storage 2026-06-17 14:16:46 +00:00
native feat(native): mmap-dom FFI loader + zero-copy View Layer (Sprint 23.2) 2026-06-24 08:40:57 +00:00
references docs: references/non-visual-dom-opti.md — 10 Regeln fur Non-Visual-DOM (Phase 3/4 Plan) 2026-06-19 15:49:39 +00:00
scripts real-page-loads: switch from curl to rustls for Chrome-identical TLS fingerprint 2026-06-20 06:34:50 +00:00
src feat(native): mmap-dom FFI loader + zero-copy View Layer (Sprint 23.2) 2026-06-24 08:40:57 +00:00
tests feat(native): mmap-dom FFI loader + zero-copy View Layer (Sprint 23.2) 2026-06-24 08:40:57 +00:00
.gitignore feat(native): mmap-dom — zero-copy DOM storage foundation (Sprint 23.0+23.1) 2026-06-24 08:31:07 +00:00
ACTION-PLAN.md Action plan: simple 4-phase approach — Named params + module import() + webpack capture 2026-06-18 07:10:10 +00:00
ARCHITECTURE-PROPOSAL.md Architecture proposal: two-path execution (classic + module) for spec correctness + performance 2026-06-18 07:02:22 +00:00
ARCHITECTURE-V2.md docs: Architecture v2 Plan — ES Module, Performance, API Completeness (refs #56) 2026-06-18 13:11:42 +00:00
bench-test-500kb.html feat(#96): TokenPool — Zero-Allocation HTML Tokenizer 2026-06-19 20:10:26 +00:00
bench-time.ts chore: token pool + CSS perf benchmarks 2026-06-19 20:14:25 +00:00
bench-token-pool.ts feat(#96): TokenPool — Zero-Allocation HTML Tokenizer 2026-06-19 20:10:26 +00:00
bun.lock fix #104: Phase 2+5 — Events, QuerySelector, Window-Adapter, Runtime-Integration 2026-06-19 15:23:02 +00:00
cli.ts feat: ExecutionRealm + Discord URL resolution + window proxy fixes 2026-06-17 20:51:34 +00:00
COMPATIBILITY.md Phase 0b+0c: Close 24 completed Forgejo issues, update COMPATIBILITY.md 2026-06-18 06:28:39 +00:00
CONVERGENCE-GAP-CLOSURE.md docs: comprehensive Sprint 25 report — fixes, test results, corpus status, roadmap 2026-06-20 07:11:54 +00:00
GOAL.md docs: add project goal in GOAL.md 2026-06-17 13:18:52 +00:00
head fix: LayoutEngine überschreibt Happy DOM + FakeLayout korrekt 2026-06-19 11:53:10 +00:00
HOW-TO-DEVELOP.md docs: add strict-fail spec in HOW-TO-DEVELOP.md 2026-06-17 13:10:09 +00:00
index.ts chore: initial bun project scaffold 2026-06-17 13:07:05 +00:00
INTERACTION-API-PLAN.md docs: Playwright/Puppeteer-orientierter Interaction-API-Plan 2026-06-17 15:12:01 +00:00
package-lock.json feat: ExecutionRealm + Discord URL resolution + window proxy fixes 2026-06-17 20:51:34 +00:00
package.json test scripts: categorisiert + test:coverage:core ohne Netzwerk-Timeout 2026-06-20 07:39:45 +00:00
PACKAGES.md docs: remove vitest, use bun test natively 2026-06-17 13:15:37 +00:00
PLAN-MAPS.md docs: Google Maps integration plan + 5 new issues 2026-06-17 14:01:54 +00:00
PLAN.md docs: add detailed build plan + issue creation scripts 2026-06-17 13:37:47 +00:00
REACT-COMPAT-PLAN.md React 19 compatibility: Forms + Concurrent polyfills + Integration tests 2026-06-17 16:43:33 +00:00
react19-bundle.js feat: ExecutionRealm + Discord URL resolution + window proxy fixes 2026-06-17 20:51:34 +00:00
react19-entry.jsx feat: ExecutionRealm + Discord URL resolution + window proxy fixes 2026-06-17 20:51:34 +00:00
README.md chore: initial bun project scaffold 2026-06-17 13:07:05 +00:00
rules.md docs: rename SLMR.md -> rules.md 2026-06-17 13:21:37 +00:00
SPEC-GAP-REPORT.md Full detection run: fix CLI to use Page class, 19-site scan, spec-gap report 2026-06-18 06:58:57 +00:00
STRATEGY.md docs: add development strategy — error-on-unimplemented, test-first, 100% coverage 2026-06-17 13:43:51 +00:00
TEST-REPORT.md Full detection run: fix CLI to use Page class, 19-site scan, spec-gap report 2026-06-18 06:58:57 +00:00
tsconfig.json feat: fake layers — layout, canvas/WebGL, media/fonts/permissions, observers 2026-06-17 13:52:27 +00:00
WHAT-TO-BUILD.md docs: add build spec in WHAT-TO-BUILD.md 2026-06-17 13:11:05 +00:00

true-headless-browser

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.3.14. Bun is a fast all-in-one JavaScript runtime.