markplus_render 0.1.0

HTML and PDF renderer for the MarkPlus ecosystem (AST → HTML / Typst → PDF)
Documentation
[package]

name = "markplus_render"

version = "0.1.0"

edition = "2024"

license = "Apache-2.0"

description = "HTML and PDF renderer for the MarkPlus ecosystem (AST → HTML / Typst → PDF)"

readme = "README.md"

repository = "https://github.com/PurnenduK90/markplus-render"

keywords = ["markdown", "renderer", "typst", "html", "wasm"]

categories = ["text-processing", "rendering", "wasm"]



[lib]

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



# ---------------------------------------------------------------------------

# Core dependencies — always present

# ---------------------------------------------------------------------------

[dependencies]

markplus_core = { version = "1.0.0" }

serde         = { version = "1.0", features = ["derive"] }

serde_json    = "1.0"

tera          = "1.20"

anyhow        = "1.0"



# ---------------------------------------------------------------------------

# Optional wasm-bindgen glue (enabled by `--features wasm`)

# ---------------------------------------------------------------------------

wasm-bindgen             = { version = "0.2", optional = true }

web-sys                  = { version = "0.3", features = ["console"], optional = true }

serde-wasm-bindgen       = { version = "0.6", optional = true }

console_error_panic_hook = { version = "0.1", optional = true }



# ---------------------------------------------------------------------------

# Native-only: full Typst engine with font discovery

# ---------------------------------------------------------------------------

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

typst        = "0.14"

typst-as-lib = { version = "0.15", features = ["packages", "reqwest", "typst-kit-fonts"] }

typst-pdf    = "0.14"

typst-kit    = { version = "0.14", features = ["fonts"] }



# ---------------------------------------------------------------------------

# Wasm-only: minimal Typst engine + embedded fonts; typst-kit excluded

# (typst-kit pulls in native-tls / openssl which cannot compile to wasm)

# ---------------------------------------------------------------------------

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]

typst        = "0.14"

typst-as-lib = { version = "0.15" }

typst-pdf    = "0.14"

getrandom    = { version = "0.3", features = ["wasm_js"] }

wasm-bindgen = "0.2"

js-sys       = "0.3"



# ---------------------------------------------------------------------------

# Features

# ---------------------------------------------------------------------------

[features]

# default: native HTML + Typst renderers only — no wasm-bindgen exports

default = []

# wasm: adds wasm-bindgen exports; keep off unless building for wasm target

wasm = ["wasm-bindgen", "web-sys", "serde-wasm-bindgen", "console_error_panic_hook"]



# ---------------------------------------------------------------------------

# Dev / example dependencies

# ---------------------------------------------------------------------------

[dev-dependencies]

tempfile = "3"