A modern Flash successor · One WebAssembly kernel, zero DOM clutter

Flash’s creative magic. Rust’s speed. WebAssembly’s safety.

For twenty years, the web traded integrated timelines, expressive vector motion, and one-file creative publishing for fragile bundler chains and megabytes of JavaScript. Fresh brings back the joy of making interactive worlds — powered by a deterministic Rust & WebAssembly engine that runs identically in any browser, on desktop, and on headless edge servers.

5.4 KiB
Brotli JS embed loader (<fresh-applet>)
< 1.5 MiB
CI-gated full site bundle + renderer + UI font
60 Hz
Deterministic fixed-timestep kernel simulation
0 DOM
Text, layout, vectors & UI drawn purely in Rust
01 // Why Fresh Exists

What Flash got right — without the security holes or vendor lock-in.

Flash let designers and coders ship timelines, custom UI, games, audio, and video in one self-contained artifact that looked identical everywhere. Fresh keeps that authoring unity while replacing proprietary NPAPI plugins with open Web standards.

The problem with modern web stacks

  • Creative work is fractured across CSS layouts, DOM state frameworks, heavy bundlers, and ad-hoc canvas shims.
  • Audio drifts across frame rates, fonts render differently across operating systems, and third-party widgets leak memory and privileges.
  • Server-side rendering and realtime multiplayer require rewriting client logic twice in incompatible toolchains.

How Fresh solves it

  • One portable artifact: A .fresh project packs vectors, timelines, components, scripts, audio patches, and plugins cleanly into a byte-reproducible archive.
  • One WebAssembly kernel: Simulation, vector paths (FDRW), text shaping (HarfRust), layout, and audio events (FAUD) stay identical across browser, desktop (rash), and server (fresh-server).
  • Sandboxed by default: Content starts with zero authority; audio, camera, microphone, networking, and native APIs require explicit capability grants.
02 // Live Interactive WebAssembly Stage

Running live right now via cdn.kwot.in.

Both canvases below are real Rust + WebAssembly Fresh kernels compiled once and shared across the page, exchanging live properties and RPC calls with plain HTML controls.

Vector Manifold & Procedural Noise FDRW · noise2d · 2-Way RPC
Hydrating Wasm…
Click inside the canvas or adjust sliders to drive Fresh.host props and events.
Sample-Accurate FAUD Synthesizer Rust FAUD DSP · AudioWorklet
Stopped (no autoplay) · Click START or tap any pad inside the Wasm canvas.
03 // Platform Capabilities

Everything needed to create, score, stream, and ship.

Every layer is written in pure Rust or compiled to compact WebAssembly modules — no hidden browser hacks or platform-specific UI frameworks.

Vector & Timelines

Vello Paths, MovieClips & ISF Shaders

Rich cubic Béziers, gradients, strokes, filters, ActionScript-style hierarchical MovieClips, 31 Penner eases, and ISF v2 + Lygia shaders unified over FDRW v3.

Sample-Accurate Audio

FAUD Synth & Portable Modular DSP

Built-in polyphonic FM/acid/chord synthesizer plus portable Wasm Eurorack plugins (Marbles, Plaits, Clouds) streamed glitch-free over AudioWorklet.

68 Rust UI Components

Zero-DOM Responsive Interfaces

Declarative .ui.json trees with container-width layout plans, HarfRust/Skrifa font shaping, accessibility via AccessKit, touch scrolling, and pinch zoom.

Realtime Media & FWP

WebSockets, Live Video, Camera & Mic

Custom Fresh Wire Protocol multiplexing draws, audio events, FVC2 video, ADPCM audio, browser getUserMedia streams, and Frei0r Wasm video filters.

Portable Plugins

One Binary: Client or Server

Memory-capped, fuel-budgeted core Wasm plugins communicate through typed wire frames so DSP and codecs run identically in browser or server.

Embed Anywhere

<fresh-applet> JavaScript SDK

A 5.4 KiB loader shares one compiled runtime across every widget on existing web pages with reactive props, events, and async JS ↔ Wasm RPC.

Deterministic Tooling

freshc, freshsnap & Studio

Byte-identical ZIP packing with BLAKE3 lockfiles, SWF decompilation (import-swf), headless visual regression snapshots, and AI/MCP hot reload via Bulb.

Native Projection

Rash & Crash Beyond the Browser

Package projects as standalone Linux, Windows, macOS, and Android apps with capability-gated filesystem, dialogs, clipboard, and Miracast casting.

04 // Architectural Philosophy

Rules, not wishes.

Fresh’s specifications define strict invariants that every runtime, compiler, and host loader must satisfy — verified automatically in CI on every commit.

PRINCIPLE 01

Pure WebAssembly Everywhere

One portable kernel runs in browsers, native Wasmtime shells, and WASI servers cleanly — zero heavy C runtime dependencies or hidden OS assumptions.

PRINCIPLE 02

Host JS Is Glue Only

Like SWFObject for Flash, JavaScript only fetches Wasm, forwards input/audio buffers, and bridges host props. Features never live in host JS.

PRINCIPLE 03

Draw & Audio as Binary Buffers

Every frame emits one aligned FDRW draw buffer and one FAUD audio packet batch — enabling identical CPU, GPU, snapshot, and remote streaming.

PRINCIPLE 04

Strict Budgets in CI

Published sites stay under 1.5 MiB brotli first-load and embeddable kernels under 1 MiB, enforced by automated size gates alongside PNG snapshot diffs.

PRINCIPLE 05

Zero Ambient Authority

Content runs sandboxed until capabilities like audio.output, video.input, net.websocket, or native.fs are explicitly granted.

PRINCIPLE 06

Open, Reproducible Archives

.fresh files are canonical JSON + deterministic ZIP containers verified with BLAKE3 lockfiles — no opaque binary traps.

05 // Developer Ergonomics

High-level TypeScript & FreshScript over a Rust core.

Scripts stay concise inside QuickJS while typed binary arrays, shaping, layout, rendering, and audio synthesis run at native/Wasm speed.

Three Execution Tiers

1. Application Kernel (fresh-runtime + fresh-ui) Fixed-timestep scene graph, MovieClips, QuickJS VM, 68 immediate-mode components, FDRW v3 encoder, FAUD DSP, and Fresh.stream/modular hosts.
2. Portable Plugin & WASI Tier (wasm32-wasip2) Sandboxed fresh-server, fresh-tv, fresh-dj, on-demand Oxc FreshScript compiler, FVC2 decoder, Eurorack audio modules, and Frei0r filters.
3. Thin Platform Hosts fresh-player in the browser, fresh-sdk.js for embedded widgets, rash + fresh-studio natively, and rast for Miracast / HLS casting.
// Deterministic motion, vectors & sample-accurate audio in FreshScript
const clip = Fresh.createMovieClip("orb", 60, "loop");

Fresh.onFrame((dt, timeMs) => {
  Fresh.clear(7, 10, 20);
  const t = Fresh.ease("cubicInOut", (Math.sin(timeMs * 0.002) + 1) * 0.5);
  const radius = Fresh.lerp(42, 118, t);

  Fresh.draw.circle(Fresh.width * 0.5, Fresh.height * 0.5, radius, 46, 230, 197, 220);
  Fresh.drawText(24, 24, `60 Hz · step ${(dt * 1000).toFixed(1)} ms`, 16, 230, 240, 255);
});
<script type="module" src="https://cdn.kwot.in/v1/fresh-sdk.min.js"></script>

<fresh-applet id="orb"
  src="https://cdn.kwot.in/v1/applets/kwot-hyperfold.js"
  width="540" height="300" data-prop-fold="7"></fresh-applet>

<script type="module">
  const el = document.getElementById("orb");
  await el.ready;
  el.on("collapse", (ev) => console.log("From Wasm:", ev));
  const state = await el.invoke("inspectState");
</script>
# Create, inspect, pack & build a .fresh project
freshc init my-world
freshc pack my-world -o my-world.fresh
freshc build my-world -o public

# Snapshot-test any frame without a browser
freshsnap fresh_runtime.wasm --script my-world/library/scripts/main.ts --frame 60 -o out.png

# Package a standalone desktop/mobile projector app
freshc native my-world --target linux -o dist/my-app
06 // Ambitions & Honest Roadmap

Shipping real code today. Built to go much further.

Fresh separates what already runs in production from what is on the roadmap — no vaporware checklists.

Live Today Implemented

  • FDRW v3 vector renderer (vello_cpu), HarfRust/Skrifa typography, ISF v2 + Lygia shaders, and 68 immediate-mode UI components.
  • FAUD sample-accurate synth engine, portable Marbles / Plaits / Clouds Eurorack Wasm DSP, and dual-deck DJ mixer.
  • fresh-server (WASI 0.2), fresh-tv FVC2 + IMA ADPCM live relay, browser camera/mic capture with Frei0r Wasm filters, and Bulb MCP hot-reload.
  • freshc, freshsnap headless visual regression, fresh-studio / rash / crash scaffolds, and the 5.4 KiB <fresh-applet> CDN SDK.

Where We’re Headed M1–M6 Ambitions

  • Default WebGPU Rasterization: Promote vello_hybrid + direct WGSL ISF shader passes into the main browser player alongside WebGPU parity tests.
  • WebTransport & Hardware Codecs: Pair HTTP/3 unreliable datagrams with WebCodecs zero-copy GPU textures for ultra-low-latency streaming.
  • Full Creative Authoring Suite: Complete interactive vector/timeline/component visual editing in fresh-studio and crash so designers publish straight to web or native app bundles.
  • Multi-Language Scripting: Add a second ScriptEngine tier powered by clojurust (interactive immutable Clojure workflows + time-travel state snapshots).

Ready to make interactive things again?

Open the live Studio in your browser, browse 35+ runnable TypeScript examples, or read the full architecture specifications.