[package] name = "weaver-renderer" version.workspace = true edition.workspace = true license.workspace = true publish = false [features] default = ["syntax-highlighting", "syntax-css", "pckt"] pckt = [] # Basic syntax highlighting (code_pretty.rs) - works in WASM syntax-highlighting = ["dep:syntect"] # CSS generation from themes (css.rs) - native only, needs plist + themes syntax-css = ["syntax-highlighting"] # Built-in colour schemes and code themes for UI selection (server only) themes = [] [dependencies] n0-future.workspace = true weaver-common = { path = "../weaver-common" } weaver-api = { path = "../weaver-api" } jacquard.workspace = true serde.workspace = true markdown-weaver = { workspace = true } http = "1.3.1" url = "2.5.4" markdown-weaver-escape = { workspace = true, features = ["std"] } thiserror.workspace = true tracing.workspace = true miette.workspace = true unicode-normalization = "0.1.24" unicode-bidi = "0.3" yaml-rust2 = { version = "0.10.2" } bitflags = "2.9.1" dashmap = "6.1.0" pin-utils = "0.1.0" pin-project = "1.1.10" smol_str = { version = "0.3", features = ["serde"] } pulldown-latex = "0.6" mime-sniffer = "0.1.3" palette = "0.7" csscolorparser = { version = "0.7", features = ["lab"] } # Native: full syntect with onig (fast) + themes for CSS generation [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] syntect = { workspace = true, default-features = false, features = [ "parsing", "html", "default-syntaxes", "default-themes", "plist-load", "regex-onig" ], optional = true } regex = { version = "1.12" } tokio = { version = "1.28", features = ["rt", "time"] } tokio-util = { version = "0.7.14", features = ["rt"] } ignore = "0.4.23" reqwest = { version = "0.12.7", default-features = false, features = [ "json", "rustls-tls", ] } # WASM: minimal syntect with fancy-regex (pure Rust), no themes [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] syntect = { workspace = true, default-features = false, features = [ "parsing", "html", "default-syntaxes", "regex-fancy" ], optional = true } regex-lite = { version = "0.1" } [dev-dependencies] insta = { version = "1.40", features = ["yaml"] } serde_json = "1.0"