Files
lightcraft/apps/lightcraft-web/Cargo.toml
T
Dylan M. Taylor e4dd081dd4 Use craft-gainmap from craft-libs for gain map metadata and arithmetic
Use craft-gainmap from craft-libs for gain map metadata and arithmetic

* Use craft-heif from craft-libs; remove crates/heif

lightcraft-heif moved to craft-libs unchanged as craft-heif
(storytold/craft-libs#784), so PhotoCraft can share it. The layer table,
the heif CI step and the change triggers drop the local crate; a workspace
file change (which a craft-heif rev bump is) still runs the heif step.

* Pin craft-heif to the merge of storytold/craft-libs#794

* docs: the HEIF rows point at craft-heif, not the removed crates/heif

* Use craft-gainmap from craft-libs for gain map metadata and arithmetic

crates/codecs/src/gainmap.rs keeps the JPEG layout (encode_jpeg, read_jpeg,
is_gain_map_jpeg) and re-exports GainMapMeta, GainImage, GainMapOptions,
ISO_URN, compute and apply from craft-gainmap, which is this file's metadata
and arithmetic moved to craft-libs (storytold/craft-libs#904). The tests of
the moved code went with it.

* craft-heif's Options has a chroma field at this rev: keep the libheif upsampling LightCraft had

* raw: count the chunks a TIFF declares from its offsets table

craft-tiff builds at most one chunk descriptor per byte of file
(craft-libs#827), so a grid of tiles sharing one payload lists fewer
chunks than the image declares. Compare the offsets table, which is the
source of truth, so such a file reaches the byte-accounting check and is
refused for the data it actually holds.
2026-11-12 00:43:54 -05:00

89 lines
2.3 KiB
TOML

[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 }