Tome Binary Size & Memory Footprint — Executive Technical Assessment
Architecture Trade-Offs, Independent Audit Verdict, 10-App Tome vs. Native Rust Benchmarks & Strategic Roadmap
Merge Gate: Hold (5 Fixes) Audit-Verified Data Linux x86_64 · Wayland
AppImage Download
12.1 MiB
Down from 18.3 MiB (−33.9%); ~10.3 MiB safe ceiling (6.8 MiB Bun-only floor)
Typical Heap vs. Rust
+3.5 MiB
Audit-corrected median Private Dirty gap across 9 of 10 apps (range +2.9 to +4.3 MiB)
Large-Tree Outlier
+17.9 MiB
200-row table (1,200 cells): 49.8 vs. 31.9 MiB Rust — #1 real engineering target
Packaging RAM Tax
−46.9 MiB
Eliminated by dropping resident DwarFS FUSE daemon (trades ~38 MiB disk cache)

01Bottom Line for Leadership

Strategic Verdict
Tome is already close to native Rust in private memory for standard desktop UIs — and ~3 MiB is not a viable target.
For typical desktop applications, embedding Bun/JavaScriptCore on top of Rune adds only ~3.5 MiB of private heap and ~10–12 MiB of resident executable memory over pure native Rust (with GPU driver memory identical on both sides). Conversely, pushing packaged downloads below ~10 MiB hits rapidly diminishing returns, and reaching ~3–5 MiB is mathematically impossible without abandoning Bun/JavaScriptCore — which would destroy Tome's core value proposition as a batteries-included Electron alternative.
Why independent audit mattered (Two critical catches)

An independent red-team audit (Claude Fable 5.2) caught five merge-blocking defects in the optimization branch (security/cache-trust bugs in the new 19 KiB launcher, runtime aborts on unseen dynamic globals, silent crash-hook disablement, and a driver-library memory-trim race) AND discovered that our first 10-app benchmark run used a runtime built without the motion feature, silently truncating 7 of 10 UIs. Every number in this brief reflects the audit-corrected, full-feature re-measurement.

02Binary Size Reality: Where the Megabytes Live & Why ~3 MiB Is a Cliff

Compressed xz / AppImage

Upstream Bun compiling a bare console.log("hello") with --aot --trim (zero GUI) is already 6.81 MiB compressed (24.18 MiB raw). Native Rust Rune with zero JS runtime is 5.98 MiB compressed (16.47 MiB raw). Every target below ~10 MiB must be evaluated against those two physical floors.

main Baseline (DwarFS)53.7 MiB raw + 1.43 MiB FUSE stub
18.25 MiB
Wave 1A: AOT-Friendly TS41.6 MiB raw (DwarFS) — free win
14.30 MiB
Wave 1B: Full Branch (txz)38.5 MiB raw + 19 KiB stub (needs fixes)
12.07 MiB
Safe Next CeilingLatin Inter + opt CJK word dict + SPIR-V
~10.3 MiB
Bun/JSC Floor (No UI)console.log("hello") --aot --trim
6.81 MiB
Native Rust Rune (No JS)16.5 MiB raw, opt-level=z + LTO
5.98 MiB
Size TierWhat It RequiresStrategic Impact / CostVerdict
~12.0 MiB AOT-friendly rune-ts/tome + Rust size build + hardened launcher + safe Bun trim Zero API loss once 5 audit blockers are fixed; txz trades +38 MiB disk cache for −46.9 MiB FUSE RAM Ship After Fixes
~10.0–10.5 MiB Latin-subset Inter font, optional Linux CJK word dictionary (keeping SE-Asian line-wrap), precompiled SPIR-V CJK double-click becomes per-char (matches Rune on Windows); non-Latin glyphs use system fonts; matches Metal/DX shader model Safe Opt-In Next
~8.0–9.0 MiB Drop X11, image codecs, D-Bus portals/a11y, all ICU dictionaries, all fonts + deep Bun fork Breaks X11 desktops, accessibility, SE-Asian wrapping, minimal distros; permanent Bun fork maintenance tax Avoid
~5.0 MiB Replace Bun/JavaScriptCore with Hermes or QuickJS Loses Bun/Node APIs, npm package ecosystem, AOT compiler, and JSC performance Dealbreaker
~3.0 MiB Also replace Rune/wgpu/Parley/Taffy with system GTK/WebView No longer Tome or Rune — becomes a Tauri-like system WebView wrapper with per-distro ABI risk Dealbreaker

03Memory Reality: 10-App Vanilla Tome vs. Native Rust Rune (Audit-Corrected)

Full-feature runtime (minimal,motion,live,shape,rich-text,edit), empty stderr, warm NVIDIA Vulkan shader cache, settled at 1.8 s
Tome main (Direct*) Wave 1 (No Trim) Wave 1 (+Trim) Native Rust (Default) Native Rust (+Trim)

*Note: On main, running as a DwarFS .AppImage adds an additional +46.9 MiB PSS from the resident FUSE daemon (bringing typical shipped apps to ~137 MiB). Highlighted row (05-data-table) exposes the real large-tree overhead (+17.9 MiB Private Dirty over Rust; +22.4 MiB on software Vulkan).

Where Every Megabyte Goes — 10-App Median Anatomy (Corrected PSS)

Anon Heap + System App Executable (.text/.rodata) GPU Driver & Wayland

04Audit Risk Ledger: Free Wins vs. Merge-Blocking Defects

5 Must-Fix Before Merge
Genuinely Free Wins (Keep)

• Static property encoding & AOT-friendly rune-ts/tome (−3.95 MiB compressed, zero functional loss)
• Removing CLI/Tools & crash-report boilerplate from standalone apps
• Eliminating the 46.9 MiB resident FUSE daemon (once extraction cache is hardened)
• Disabling unused disk config autoloading (bunfig, tsconfig, package.json) and stats allocation when inactive

Real Product Trade-Offs (Make Opt-In)

• Disk vs. RAM: txz shrinks download to 12.1 MiB and saves 46.9 MiB RAM, but stores a 38.5 MiB unpacked binary per version on disk (~50.6 MiB total; needs cache eviction)
• Compile defaults: Stripping function source text breaks fn.toString(); disabling .env autoloading diverges from tome dev; stripping profilers breaks heap snapshots
• Trimmed PSS accounting: Clean code pages evicted via madvise remain in the OS page cache and fault back on interaction

#Merge-Blocking Defect (Verified by Audit)Operational / Security ImpactRequired Fix
B1 Gated WebCore globals abort instead of throwing 22 of 44 trimmed globals abort the process (and crypto.subtle segfaults) when reached via unseen dynamic code, breaking JS error semantics Revert or repair constructor gating in Bun patch 0005 so removed features throw catchable ERR_FEATURE_REMOVED
B2 txz cache directory trusted blindly Predictable /tmp fallback without owner/mode verification allows local binary hijack under empty env; edited or missing cached files are never re-verified or healed Verify ownership/mode (or mkdtemp), embed real payload hash, self-heal on execv failure, add cache eviction; keep DwarFS default until hardened
B3 txz packaging can silently drop files Missing pipefail on tar | xz exits 0 on long paths; runtime ignores tar hardlinks silently Enable pipefail, fail on unsupported tar entry types, verify post-pack file counts
B4 madvise on third-party GPU .sos TOCTOU race if a driver thread unloads a shared library and allocator reuses its VA range → silent heap zeroing Restrict madvise(MADV_DONTNEED) strictly to /proc/self/exe (which cannot unload)
B5 immediate-abort breaks crash capture Silently turns Rust panics into bare SIGILL, disabling tome-os panic reporting (message, location, trace) Drop -Cpanic=immediate-abort (minimal size cost) and enforce tome build runtime feature validation

05How Close Can Tome Get to Native Rust — & Recommended Execution Plan

Zero-Trade-Off Frontier

Independent testing ruled out JSC JIT/heap flags (committed JIT is already 0 MiB in AOT apps; tuning moved heap by ≤0.3 MiB) and showed that symbol ordering and madvise overlap on the same code pages. The honest, zero-trade-off ceiling for Tome is within +8 to +12 MiB PSS (~15–20%) and +3 to +3.5 MiB heap of native Rust for standard apps, at ~10–12 MiB compressed (~2× Rust).

Phase A · Merge Gate (Immediate)
  • Resolve all 5 audit blockers (B1–B5) and restore DwarFS as default until txz cache hardening + eviction ship.
  • Make motion,live,shape,rich-text,edit default in runtime builds and make tome build fail fast on missing runtime features.
  • Expose function-source, .env, and profiler stripping as explicit config flags.
Phase B · Zero-Trade-Off RAM (High ROI)
  • Profile & fix the +17.9 MiB table gap: Audit why 200-row tables allocate 18 MiB more heap in Tome than Rust (retained-tree node count & JS/native duplication).
  • Generate a real Tome symbol-order file: Bun's local linker.order is currently empty; hot/cold packing halves resident code pages cleanly.
  • Apply safe /proc/self/exe-only trim on true first idle.
Phase C · Safe Size Polish (Optional)
  • Ship Latin/Greek/Cyrillic Inter subset (~−0.3 MiB xz).
  • Gate Linux CJK word dictionary behind a feature while keeping SE-Asian line-break dictionaries (~−1.0 MiB xz, matching Windows).
  • Adopt precompiled SPIR-V on Linux matching Metal/DX.
  • Stop at ~10–10.5 MiB: further cuts harm compatibility more than they return.