GitCorner

Code

ossartcraftlightcraft🌐
5a24289898fd
[package]
name = "lightcraft-web"
version.workspace = true
edition.workspace = true
license.workspace = true
publish = false
description = "LightCraft in the browser: the egui UI compiled to WASM (build with `cargo xtask web`)"

[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
lightcraft-engine = { workspace = true }
lightcraft-ui-egui = { workspace = true }
lightcraft-codecs = { workspace = true }
lightcraft-raster = { workspace = true }
lightcraft-preview = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
log = { workspace = true }
crc32fast = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
eframe = { workspace = true, features = ["default_fonts", "glow"] }
egui = { workspace = true }
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = { workspace = true }
js-sys = { workspace = true }
web-sys = { workspace = true, features = [
    "Blob",
    "BlobPropertyBag",
    "CustomEvent",
    "CustomEventInit",
    "CssStyleDeclaration",
    "DedicatedWorkerGlobalScope",
    "Document",
    "DomStringList",
    "Element",
    "Event",
    "EventTarget",
    "File",
    "FileList",
    "FileSystemCreateWritableOptions",
    "FileSystemDirectoryHandle",
    "FileSystemFileHandle",
    "FileSystemGetDirectoryOptions",
    "FileSystemGetFileOptions",
    "FileSystemRemoveOptions",
    "FileSystemWritableFileStream",
    "HtmlAnchorElement",
    "HtmlCanvasElement",
    "HtmlElement",
    "HtmlInputElement",
    "IdbDatabase",
    "IdbFactory",
    "IdbKeyRange",
    "IdbObjectStore",
    "IdbOpenDbRequest",
    "IdbRequest",
    "IdbTransaction",
    "IdbTransactionMode",
    "IdbVersionChangeEvent",
    "Location",
    "MessageEvent",
    "Navigator",
    "Performance",
    "StorageManager",
    "Url",
    "Window",
    "Worker",
    "WorkerOptions",
    "WorkerType",
    "WritableStream",
] }

[features]
# Open HEIC/HEIF photos (the optional craft-heif crate). Not default so distributors choose
# it (HEVC patents); build with `--features heif` to include it. On wasm32 panics abort, so
# heic-rs's `catch_unwind` guard does not apply there.
heif = ["lightcraft-codecs/heif"]

[dev-dependencies]
egui = { workspace = true }
lightcraft-color = { workspace = true }
lightcraft-raw = { workspace = true }