mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-02 20:22:15 -05:00
Adds an optional file-provider bridge for a trusted same-origin CADCraft web host. It is off until the host calls registerProvider. Provider Save and Open transfer single DXF files in memory and refuse drawings with external images or xrefs. Contributed by @alejocapo04.
43 lines
1.8 KiB
TOML
43 lines
1.8 KiB
TOML
[package]
|
|
name = "cadcraft-web"
|
|
description = "CADCraft in the browser (eframe web runner, WebGPU with WebGL2 fallback)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version = "1.95"
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[[bin]]
|
|
name = "cadcraft-web"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
cadcraft-engine = { workspace = true }
|
|
cadcraft-ui-egui = { workspace = true }
|
|
cadcraft-io = { workspace = true }
|
|
cadcraft-fonts = { workspace = true }
|
|
# The host messages (storytold/craft-libs): one contract and one bridge for the web builds.
|
|
# The page command API (storytold/craft-libs#413): window.cadcraft over the control channel.
|
|
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "0.1.0" }
|
|
craft-web-host = { git = "https://github.com/storytold/craft-libs", rev = "8fa4db64a9bb943520259ea95331a303ba788f21", version = "0.1.0" }
|
|
egui = { workspace = true }
|
|
log = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
# File > Open… and dropped files (src/upload.rs): the browser's file picker and file reads.
|
|
[target.wasm32-unknown-unknown.dependencies]
|
|
web-sys = { version = "0.3", features = ["HtmlInputElement", "FileList", "File"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
eframe = { workspace = true, features = ["persistence", "wgpu", "accesskit"] }
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
js-sys = "0.3"
|
|
web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "HtmlAnchorElement", "Location", "Navigator", "Blob", "BlobPropertyBag", "Url", "MessageEvent", "UrlSearchParams", "MediaQueryList", "Event", "EventTarget", "CustomEvent", "CustomEventInit"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
wasm-bindgen-test = { workspace = true }
|