mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-25 12:00:50 +01:00
src/web.rs starts the editor on a page canvas with eframe's WebRunner (WebGL2 via glow) and provides the browser's services; platform.rs decides when: picked files go to the engine's in-memory store and the command runs, saves and exports leave as downloads, preferences and recovery copies live in localStorage, Web Locks tell open tabs from crashed ones, and leaving with unsaved work asks first. The GPU stage and sound output become build cfgs that are off on wasm. Video export and plug-in installs are dimmed in the browser with the reason. scripts/build-web.sh and .ps1 build web/ with the wasm-bindgen CLI pinned to Cargo.lock's version, from packaging/web/index.html. The web profile (opt-level s, stripped, renderer and geometry at opt-level 3) gives an 8973 KB module, 3278 KB gzipped, in 41 s. crates/engine/tests/wasm.rs runs the engine inside WebAssembly in Node (3 tests, 0.6 s).
37 lines
1.0 KiB
TOML
37 lines
1.0 KiB
TOML
[package]
|
|
name = "anicraft-engine"
|
|
description = "AniCraft L3: session, undo history, command registry and the .anicraft file format"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish.workspace = true
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
anicraft-geom.workspace = true
|
|
anicraft-doc.workspace = true
|
|
anicraft-render.workspace = true
|
|
anicraft-xfl.workspace = true
|
|
anicraft-svg.workspace = true
|
|
anicraft-text.workspace = true
|
|
anicraft-plugins.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
rayon.workspace = true
|
|
web-time.workspace = true
|
|
gif.workspace = true
|
|
|
|
[dev-dependencies]
|
|
# Decodes exported sheets in tests (already in the tree through the renderer).
|
|
png.workspace = true
|
|
# Plug-in test fixtures written in WebAssembly text (Apache-2.0 WITH LLVM-exception).
|
|
wat = "1.228"
|
|
|
|
# Runs tests/wasm.rs inside WebAssembly, in Node (ADR 0036; MIT OR Apache-2.0).
|
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
wasm-bindgen-test = "0.3"
|
|
|
|
[lints]
|
|
workspace = true
|