xmpkit 0.1.2

Pure Rust implementation of Adobe XMP Toolkit
Documentation
[package]
name = "xmpkit"
version = "0.1.2"
edition = "2021"
authors = ["XMPKit Contributors"]
description = "Pure Rust implementation of Adobe XMP Toolkit"
license = "MIT OR Apache-2.0"
repository = "https://github.com/cavivie/xmpkit"
keywords = ["xmp", "metadata", "exif", "iptc"]
categories = ["multimedia::images", "encoding"]

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

[[bench]]
name = "parse"
harness = false

[[bench]]
name = "serialize"
harness = false

[[bench]]
name = "file_io"
harness = false

[[bench]]
name = "metadata_ops"
harness = false

[dependencies]
# core
quick-xml = { version = "0.38", features = ["serialize"], optional = true }
thiserror = "2.0"
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
# files
lopdf = { version = "0.38", optional = true }
# ohos
napi-ohos = { version = "1", optional = true }
napi-derive-ohos = { version = "1", optional = true }
js-sys = { version = "0.3", optional = true }
# wasm
wasm-bindgen = { version = "0.2", optional = true }

[build-dependencies]
napi-build-ohos = { version = "1", optional = true }

[dev-dependencies]
pretty_assertions = "1.4"
tempfile = "3.23"
criterion = { version = "0.8", features = ["html_reports"] }

[features]
default = ["mutli-thread", "full-formats"]

# Core XMP functionality (parsing, serialization, metadata API)
core = ["quick-xml"]

# File format support infrastructure
files = ["core"]

# Individual file format handlers
gif = ["files"]
jpeg = ["files"]
mp3 = ["files"]
pdf = ["files", "lopdf"]
png = ["files"]
psd = ["files"]
svg = ["files"]
tiff = ["files"]
# RIFF-based formats
avi = ["files"]
wav = ["files"]
webp = ["files"]
# BMFF-based formats
mpeg4 = ["files"]
mp4 = ["mpeg4"]
m4a = ["mpeg4"]
m4v = ["mpeg4"]
mov = ["mpeg4"]
mpegh = ["files"]
heif = ["mpegh"]
heic = ["mpegh"]
avif = ["mpegh"]

# Enable file layout optimization
# Default: optimize-file-layout disabled - uses append mode (e.g., MPEG4: UUID box at end of file)
# Enable this feature to optimize file layout for streaming (e.g., MPEG4: UUID box after moov, before mdat)
optimize-file-layout = []

# Enable multi-threaded runtime support
# Multi-threaded runtime support for concurrent file processing, it's very useful for server scenarios
# When enabled, allows parallel processing of multiple files and concurrent XMP operations
mutli-thread = []

# Enable all file format handlers support
full-formats = ["avi", "gif", "jpeg", "mp3", "mpeg4", "mpegh", "pdf", "png", "psd", "svg", "tiff", "wav", "webp"]

# WebAssembly JavaScript bindings (optional)
wasm = ["wasm-bindgen", "js-sys", "serde", "serde_json"]

# OpenHarmony/HarmonyOS Node-API bindings (optional)
ohos = ["napi-ohos", "napi-derive-ohos", "napi-build-ohos", "serde", "serde_json"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_ohos)'] }