2026-10-02 00:19:35 -04:00
//! EffectCraft in the browser.
//!
//! The same engine and egui UI as the desktop app, compiled to `wasm32-unknown-unknown` and run
//! by eframe's web runner (WebGPU, WebGL2 fallback). What the desktop shell gets from the OS, this
//! crate gets from the browser:
//!
//! | Desktop | Web |
//! |---|---|
2026-10-02 23:42:00 -04:00
//! | file system (`FsServices`, media reads, export writes) | a virtual file table ([`files`]) persisted to the Origin Private File System / IndexedDB ([`persist`], [`store`]) |
//! | config directory (settings, shortcuts, recent projects, auto-saves) | the same store ([`store::WebConfig`]) |
2026-10-02 00:19:35 -04:00
//! | rfd file dialogs | `<input type=file>` pickers; drop files on the page |
2026-10-03 08:36:00 -04:00
//! | Media Browser on the file system | browser storage and folders opened with the File System Access API ([`browse`]) |
2026-10-02 00:19:35 -04:00
//! | written files (Save, Render Queue) | browser downloads (several render files as one `.zip`) |
2026-10-03 18:35:03 -04:00
//! | frame render threads | frame workers, each with a project replica fed by diffs and its own WebGPU device ([`frames`]); `Frames::pump` on the UI thread without workers |
//! | disk cache folder | frames in the Origin Private File System, written by the frame workers ([`diskcache`]) |
//! | (none) | the storage manager: usage, quota, persistence, clearing ([`storage`]) |
2026-10-02 23:42:00 -04:00
//! | Render Queue / analysis threads | Web Workers running their own engine instance ([`worker`]) |
//! | cpal audio output | Web Audio: an AudioWorklet fed from the preview mixdown ([`audio`]) |
2026-10-02 00:19:35 -04:00
//! | TCP control channel / MCP | `window.effectcraft` JavaScript API ([`api`]) |
//!
2026-10-02 23:42:00 -04:00
//! [`store`] is portable (unit-tested natively); everything else is `wasm32`-only.
2026-10-02 00:19:35 -04:00
2026-10-04 14:52:39 -04:00
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
2026-10-02 23:42:00 -04:00
pub mod store ;
#[cfg(target_arch = "wasm32" )]
2026-10-02 00:19:35 -04:00
pub mod api ;
2026-10-02 23:42:00 -04:00
#[cfg(target_arch = "wasm32" )]
mod app ;
#[cfg(target_arch = "wasm32" )]
pub mod audio ;
#[cfg(target_arch = "wasm32" )]
2026-10-03 08:36:00 -04:00
pub mod browse ;
#[cfg(target_arch = "wasm32" )]
2026-10-03 18:35:03 -04:00
pub mod diskcache ;
#[cfg(target_arch = "wasm32" )]
2026-10-02 00:19:35 -04:00
pub mod files ;
2026-10-02 23:42:00 -04:00
#[cfg(target_arch = "wasm32" )]
2026-10-03 08:36:00 -04:00
pub mod frames ;
#[cfg(target_arch = "wasm32" )]
2026-10-02 23:42:00 -04:00
pub mod persist ;
#[cfg(target_arch = "wasm32" )]
2026-10-03 18:35:03 -04:00
pub mod storage ;
#[cfg(target_arch = "wasm32" )]
2026-10-02 23:42:00 -04:00
pub mod worker ;
2026-10-02 00:19:35 -04:00
2026-10-02 23:42:00 -04:00
#[cfg(target_arch = "wasm32" )]
pub use app ::* ;