at main 75 lines 2.3 kB view raw
1[package] 2name = "weaver-renderer" 3version.workspace = true 4edition.workspace = true 5license.workspace = true 6publish = false 7 8[features] 9default = ["syntax-highlighting", "syntax-css", "pckt"] 10pckt = [] 11# Basic syntax highlighting (code_pretty.rs) - works in WASM 12syntax-highlighting = ["dep:syntect"] 13# CSS generation from themes (css.rs) - native only, needs plist + themes 14syntax-css = ["syntax-highlighting"] 15# Built-in colour schemes and code themes for UI selection (server only) 16themes = [] 17 18[dependencies] 19n0-future.workspace = true 20weaver-common = { path = "../weaver-common" } 21weaver-api = { path = "../weaver-api" } 22jacquard.workspace = true 23serde.workspace = true 24markdown-weaver = { workspace = true } 25http = "1.3.1" 26url = "2.5.4" 27markdown-weaver-escape = { workspace = true, features = ["std"] } 28thiserror.workspace = true 29tracing.workspace = true 30miette.workspace = true 31unicode-normalization = "0.1.24" 32unicode-bidi = "0.3" 33yaml-rust2 = { version = "0.10.2" } 34bitflags = "2.9.1" 35dashmap = "6.1.0" 36pin-utils = "0.1.0" 37pin-project = "1.1.10" 38smol_str = { version = "0.3", features = ["serde"] } 39pulldown-latex = "0.6" 40mime-sniffer = "0.1.3" 41palette = "0.7" 42csscolorparser = { version = "0.7", features = ["lab"] } 43 44# Native: full syntect with onig (fast) + themes for CSS generation 45[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] 46syntect = { workspace = true, default-features = false, features = [ 47 "parsing", 48 "html", 49 "default-syntaxes", 50 "default-themes", 51 "plist-load", 52 "regex-onig" 53], optional = true } 54regex = { version = "1.12" } 55tokio = { version = "1.28", features = ["rt", "time"] } 56tokio-util = { version = "0.7.14", features = ["rt"] } 57ignore = "0.4.23" 58reqwest = { version = "0.12.7", default-features = false, features = [ 59 "json", 60 "rustls-tls", 61] } 62 63# WASM: minimal syntect with fancy-regex (pure Rust), no themes 64[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] 65syntect = { workspace = true, default-features = false, features = [ 66 "parsing", 67 "html", 68 "default-syntaxes", 69 "regex-fancy" 70], optional = true } 71regex-lite = { version = "0.1" } 72 73[dev-dependencies] 74insta = { version = "1.40", features = ["yaml"] } 75serde_json = "1.0"