[package] name = "piet-common" version = "0.7.0-cairo18" authors = ["Raph Levien "] description = "Selection of a single preferred back-end for piet" license = "Apache-2.0 OR MIT" repository = "https://github.com/linebender/piet" readme = "README.md" edition = "2021" keywords = ["graphics", "2d"] [features] web = ["piet-web"] # passing on all the image features. AVIF is not supported because it does not # support decoding, and that's all we use `Image` for. image = ["piet/image"] image_png = ["piet/image_png"] jpeg = ["piet/jpeg"] gif = ["piet/gif"] bmp = ["piet/bmp"] ico = ["piet/ico"] tiff = ["piet/tiff"] webp = ["piet/webp"] pnm = ["piet/pnm"] dds = ["piet/dds"] tga = ["piet/tga"] hdr = ["piet/hdr"] serde = ["piet/serde"] [dependencies] piet = { version = "=0.7.0-cairo18", path = "../piet" } piet-web = { version = "=0.7.0-cairo18", path = "../piet-web", optional = true } cfg-if = "1.0.0" png = { version = "0.17.14", optional = true } [target.'cfg(any(target_os="linux", target_os="openbsd", target_os="freebsd", target_os="netbsd"))'.dependencies] piet-cairo = { version = "=0.7.0-cairo18", path = "../piet-cairo" } cairo-rs = { version = "0.18.5", default-features = false } cairo-sys-rs = { version = "0.18.2" } [target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies] piet-coregraphics = { version = "=0.7.0-cairo18", path = "../piet-coregraphics" } core-graphics = { version = "0.24.0" } [target.'cfg(target_os="windows")'.dependencies] piet-direct2d = { version = "=0.7.0-cairo18", path = "../piet-direct2d" } [target.'cfg(target_arch="wasm32")'.dependencies] piet-web = { version = "=0.7.0-cairo18", path = "../piet-web" } wasm-bindgen = "0.2.95" [target.'cfg(target_arch="wasm32")'.dev-dependencies] getrandom = { version = "0.2.15", features = ["js"] } wasm-bindgen-test = "0.3.45" [target.'cfg(target_arch="wasm32")'.dependencies.web-sys] version = "0.3.72" features = [ "console", "Window", "CanvasGradient", "CanvasRenderingContext2d", "CanvasWindingRule", "Document", "Element", "HtmlCanvasElement", "ImageBitmap", "ImageData", "TextMetrics", ] [dev-dependencies] static_assertions = "1.1.0" rand = "0.8.5" rand_distr = "0.4.3"