document-graphics 0.1.5

Render graphics from untrusted documents to RGBA, with resource limits and isolated workers.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.90"
name = "document-graphics"
version = "0.1.5"
build = false
include = [
    "src/**",
    "tests/**",
    "fonts/**",
    "README.md",
    "LICENSE",
    "Cargo.toml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Render graphics from untrusted documents to RGBA, with resource limits and isolated workers."
documentation = "https://docs.rs/document-graphics"
readme = "README.md"
keywords = [
    "mermaid",
    "svg",
    "preview",
    "rendering",
]
categories = [
    "rendering",
    "text-processing",
]
license = "MIT"
repository = "https://github.com/garlab/document-graphics"

[package.metadata.docs.rs]
all-features = true

[features]
chess = ["dep:cozy-chess"]
default = []
image-native = [
    "image-worker",
    "dep:core-graphics",
    "dep:core-foundation",
    "dep:foreign-types",
]
image-worker = [
    "images",
    "dep:png",
    "dep:serde",
    "dep:serde_json",
    "resvg/system-fonts",
    "image/gif",
    "image/webp",
    "image/bmp",
    "image/ico",
    "image/tiff",
    "image/pnm",
    "image/tga",
    "image/qoi",
]
images = ["dep:image"]
sgf = []

[lib]
name = "document_graphics"
path = "src/lib.rs"

[[test]]
name = "images"
path = "tests/images.rs"
harness = false
required-features = ["image-worker"]

[[test]]
name = "worker"
path = "tests/worker.rs"
harness = false

[dependencies.cozy-chess]
version = "0.3.4"
optional = true

[dependencies.image]
version = "0.25"
features = [
    "png",
    "jpeg",
]
optional = true
default-features = false

[dependencies.katex-native]
version = "0.1"

[dependencies.mermaid-rs-renderer]
version = "=0.1.3"
default-features = false
package = "document-graphics-mermaid"

[dependencies.png]
version = "0.18"
optional = true

[dependencies.resvg]
version = "0.45.1"
features = ["text"]
default-features = false

[dependencies.roxmltree]
version = "0.20"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dev-dependencies.gif]
version = "0.14"

[dev-dependencies.tempfile]
version = "3"

[target.'cfg(target_os = "macos")'.dependencies.core-foundation]
version = "0.10"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.core-graphics]
version = "0.24"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.foreign-types]
version = "0.5"
optional = true

[target."cfg(unix)".dependencies.libc]
version = "0.2"

[lints.clippy]
dbg_macro = "warn"
todo = "warn"

[lints.rust]
unsafe_op_in_unsafe_fn = "deny"