- solvecraft_io::vfs: the engine's file access (disk natively; in the browser an in-memory set of files the host loads and stores). File commands and write_atomic go through it. - Web host (apps/solvecraft-web/src/files.rs): stored designs are read from OPFS at start (storage.persist() asked for) and written back when a command writes one; Save/Save As keep designs in the browser, exports (STEP, STL, 3MF, OBJ, ...) download as files. - File > Open shows "Files in this browser": open, insert, rename, download, delete, plus open or insert from the computer (showOpenFilePicker where there is one, an <input type=file> otherwise). Files dropped on the page are inserted or opened. - Unsaved work is autosaved to OPFS and offered again after a reload or crash. - Start page recents come from the stored designs, with thumbnails. In the browser the samples are built when opened (a picture blocks the page there, and a kernel panic can't be caught). - Pages without OPFS (http on a network address, old browsers) keep designs in local storage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
33 lines
1.1 KiB
TOML
33 lines
1.1 KiB
TOML
[package]
|
|
name = "solvecraft-web"
|
|
description = "SolveCraft in the browser (eframe web runner, WebGPU with WebGL2 fallback)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bin]]
|
|
name = "solvecraft-web"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
solvecraft-engine = { workspace = true }
|
|
solvecraft-ui-egui = { workspace = true }
|
|
egui = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
js-sys = "0.3"
|
|
serde_json = { workspace = true }
|
|
web-sys = { version = "0.3", features = [
|
|
"Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "Location", "Navigator", "StorageManager",
|
|
"FileSystemHandle", "FileSystemDirectoryHandle", "FileSystemFileHandle", "FileSystemGetFileOptions", "FileSystemWritableFileStream",
|
|
"WritableStream", "File", "FileList", "Blob", "BlobPropertyBag", "Url", "HtmlAnchorElement", "HtmlInputElement", "Storage",
|
|
] }
|