mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
- GPU in the browser: each frame worker opens its own WebGPU device (Gpu::request_deferred) and renders the GPU compositor and GPU effects with deferred readbacks (effectcraft-gpu deferred): readbacks keyed by content start with map_async and miss, the pass returns placeholders, the layer cache's gate drops inserts, and FrameServer::resume renders again once the device delivered. Backend Auto times whole frames per comp in the workers. Frames with effects go to GPU workers instead of the page. CPU fallback without WebGPU in workers (?nogpuworkers). - Fix: a WGSL constant (3.40282347e38) that Chrome rejects invalidated every GPU kernel in Chrome (the page's compositor too); a test checks every float literal fits f32. - Disk cache in the Origin Private File System: workers write sealed frame entries with sync access handles (temp file + move), the page keeps the DiskIndex (LRU under the settings' limit, at most half the quota) and reads hits instead of rendering; survives reloads; blue cache bar. - Storage manager: Settings ▸ Disk ▸ Browser Storage (usage/quota, persistent storage, Clear buttons, automation ids) and storage.info / storage.persist / storage.clear (StorageHost). - Docs: web.md (GPU workers, deferred passes, disk cache, storage manager, threading design: one engine instance per worker), architecture, preferences, parity (WEB-1), roadmap. - Tests: deferred passes vs CPU on a real device, placeholder gating, frame server passes and Auto, GPU worker routing + disk cache across a reload, storage commands and widgets, store usage by kind; smoke test: GPU effect frames in workers with pixel parity, disk hits after a reload, storage manager. Co-Authored-By: Claude Opus 5.5 <[email protected]>
57 lines
1.6 KiB
TOML
57 lines
1.6 KiB
TOML
[package]
|
|
name = "effectcraft-web"
|
|
description = "EffectCraft in the browser (wasm32): eframe web runner, persistent browser storage (OPFS / IndexedDB), Web Audio, Web Worker renders, PWA, window.effectcraft API"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
# The browser glue is wasm32-only; on other targets the crate holds just the portable storage
|
|
# model (`store`), unit-tested natively. Build the app with `cargo xtask web` (see docs/web.md).
|
|
[dependencies]
|
|
effectcraft-engine = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
effectcraft-host = { workspace = true }
|
|
effectcraft-gpu = { workspace = true }
|
|
effectcraft-media = { workspace = true }
|
|
effectcraft-export = { workspace = true }
|
|
effectcraft-expr = { workspace = true }
|
|
effectcraft-ui-egui = { workspace = true }
|
|
egui = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu"] }
|
|
log = { workspace = true }
|
|
web-time = { workspace = true }
|
|
# The wasm-bindgen CLI used by `cargo xtask web` must be exactly this version.
|
|
wasm-bindgen = "=0.2.129"
|
|
wasm-bindgen-futures = "0.4"
|
|
js-sys = "0.3"
|
|
web-sys = { version = "0.3", features = [
|
|
"Blob",
|
|
"BlobPropertyBag",
|
|
"CssStyleDeclaration",
|
|
"Document",
|
|
"Element",
|
|
"DedicatedWorkerGlobalScope",
|
|
"Event",
|
|
"EventTarget",
|
|
"File",
|
|
"FileList",
|
|
"HtmlAnchorElement",
|
|
"HtmlCanvasElement",
|
|
"HtmlElement",
|
|
"HtmlInputElement",
|
|
"Location",
|
|
"Url",
|
|
"UrlSearchParams",
|
|
"Window",
|
|
] }
|