[package]
name = "lightningimg-wasm"
version = "0.0.1"
edition = "2021"
description = "A transparent and safe image converter for WASM. Encodes PNG, JPG, TIFF to WebP."
license = "MIT"
authors = ["Aron Homberg <info@aron-homberg.de>"]
keywords = ["PNG", "JPG", "GIF", "WebP", "TIFF", "WASM"]
repository = "https://github.com/kyr0/lightningimg"

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

[dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "tiff", "gif", "webp"] }
console_error_panic_hook = "0.1"
wee_alloc = "0.4"

[dependencies.web-sys]
version = "0.3"
features = [
  "console",
  "File",
  "FileReader",
  "Blob",
]

# For Node.js file system operations (when available)
[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[dev-dependencies]
wasm-bindgen-test = "0.2"

[profile.release]
# Tell `rustc` to optimize for performance
opt-level = 3
lto = true
codegen-units = 1
