atproto blogging
1[package]
2name = "weaver-app"
3version = "0.1.0"
4authors = ["Orual <orual@nonbinary.computer>"]
5edition = "2024"
6
7[lib]
8name = "weaver_app"
9path = "src/lib.rs"
10
11[[bin]]
12name = "weaver-app"
13path = "src/main.rs"
14
15[[bin]]
16name = "editor_worker"
17path = "src/bin/editor_worker.rs"
18required-features = ["web"]
19
20[[bin]]
21name = "embed_worker"
22path = "src/bin/embed_worker.rs"
23required-features = ["web"]
24
25[features]
26default = ["web", "fullstack-server", "use-index", "pckt"]
27# Fullstack mode with SSR and server functions
28fullstack-server = ["dioxus/fullstack"]
29# Enable pckt/site.standard document rendering
30pckt = ["weaver-renderer/pckt"]
31# Route-based WASM bundle splitting. Currently broken: causes server/client serialization
32# mismatches (bool vs String) in use_server_future, especially in navbar. Possibly related
33# to SmolStr niche optimization or type registry getting confused across module boundaries.
34# Revisit when dioxus matures this feature. Run with: dx serve --wasm-split
35wasm-split = ["dioxus/wasm-split"]
36# Use weaver-index for reads (proxied when authenticated)
37use-index = ["weaver-common/use-index"]
38
39web = ["dioxus/web", "dioxus-primitives/web"]
40desktop = ["dioxus/desktop"]
41mobile = ["dioxus/mobile"]
42server = [ "dioxus/server", "dep:jacquard-axum", "dep:axum", "dep:axum-extra", "dep:tower", "dep:tower-http", "dep:resvg", "dep:usvg", "dep:tiny-skia", "dep:textwrap", "dep:askama", "dep:fontdb", "dep:lightningcss", "weaver-common/telemetry"]
43collab-worker = ["weaver-common/iroh"]
44
45
46[dependencies]
47dashmap = "6.1.0"
48
49dioxus = { version = "0.7.1", features = ["router"] }
50weaver-common = { path = "../weaver-common", features = ["cache", "perf"] }
51weaver-editor-core = { path = "../weaver-editor-core" }
52weaver-editor-browser = { path = "../weaver-editor-browser", features = ["dioxus"] }
53weaver-editor-crdt = { path = "../weaver-editor-crdt" }
54jacquard = { workspace = true}#, features = ["streaming"] }
55jacquard-lexicon = { workspace = true }
56jacquard-identity = { workspace = true }
57jacquard-axum = { workspace = true, optional = true }
58weaver-api = { path = "../weaver-api", features = ["com_whtwnd"] }
59markdown-weaver = { workspace = true }
60weaver-renderer = { path = "../weaver-renderer", features = ["themes", "syntax-highlighting", "syntax-css"] }
61n0-future = { workspace = true }
62dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false, features = ["router"] }
63axum = { version = "0.8.6", optional = true }
64axum-extra = { version = "0.10", optional = true, features = ["typed-header"] }
65tower = { version = "0.5", optional = true }
66tower-http = { version = "0.6", optional = true, features = ["trace"] }
67mime-sniffer = {version = "^0.1"}
68chrono = { version = "0.4" }
69serde = { version = "1.0" }
70serde_json = "1.0"
71humansize = "2.0.0"
72base64 = "0.22"
73http = "1.3"
74reqwest = { version = "0.12", default-features = false, features = ["json"] }
75dioxus-free-icons = { version = "0.9", features = ["font-awesome-brands"] }
76# syntect configured per-target below
77# diesel = { version = "2.3", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "chrono", "serde_json"] }
78# diesel_migrations = { version = "2.3", features = ["sqlite"] }
79tokio = { version = "1.28", features = ["sync"] }
80serde_html_form = "0.2.8"
81regex-lite = "0.1"
82tracing.workspace = true
83serde_ipld_dagcbor = { version = "0.6" }
84loro = "1.9.1"
85markdown-weaver-escape = { workspace = true }
86web-time = "1.1"
87urlencoding = "2.1"
88tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "registry"] }
89dioxus-sdk = { version = "0.7", features = ["time"] }
90futures-util = "0.3"
91
92# OG image generation (server-only)
93resvg = { version = "0.44", optional = true }
94usvg = { version = "0.44", optional = true }
95tiny-skia = { version = "0.11", optional = true }
96textwrap = { version = "0.16", optional = true }
97askama = { version = "0.12", optional = true }
98fontdb = { version = "0.22", optional = true }
99
100# CSS minification (server-only)
101lightningcss = { version = "1.0.0-alpha.68", optional = true }
102
103[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
104webbrowser = "1.0.6"
105reqwest = { version = "0.12", default-features = false, features = ["json"] }
106ring = { version = "0.17", default-features = false, features = ["alloc"] }
107# Native: full syntect with onig
108syntect = { workspace = true, default-features = false, features = [
109 "parsing",
110 "html",
111 "default-syntaxes",
112 "default-themes",
113 "plist-load",
114 "regex-onig"
115] }
116
117[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
118reqwest = { version = "0.12", default-features = false, features = ["json"] }
119tracing-wasm = "0.2"
120# WASM: syntect with fancy-regex (no onig for wasm)
121syntect = { workspace = true, default-features = false, features = [
122 "parsing",
123 "html",
124 "default-syntaxes",
125 "default-themes",
126 "plist-load",
127 "regex-fancy"
128] }
129#sqlite-wasm-rs = { version = "0.4", default-features = false, features = ["precompiled", "relaxed-idb"] }
130time = { version = "0.3", features = ["wasm-bindgen"] }
131console_error_panic_hook = "0.1"
132weaver-embed-worker = { path = "../weaver-embed-worker" }
133chrono = { version = "0.4", features = ["wasmbind"] }
134wasm-bindgen = "0.2"
135wasm-bindgen-futures = "0.4"
136web-sys = { version = "0.3", features = ["ServiceWorkerContainer", "ServiceWorker", "ServiceWorkerRegistration", "RegistrationOptions", "Window", "Navigator", "MessageEvent", "console", "Document", "Element", "HtmlImageElement", "Selection", "Range", "Node", "HtmlElement", "TreeWalker", "NodeFilter", "DomTokenList", "Clipboard", "ClipboardItem", "Blob", "BlobPropertyBag", "EventTarget", "InputEvent", "AddEventListenerOptions", "DomRect", "DomRectList", "Performance"] }
137js-sys = "0.3"
138gloo-storage = "0.3"
139gloo-timers = "0.3"
140gloo-worker = { version = "0.5", features = ["futures"] }
141postcard = "1.1"
142ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js"]}
143getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] }
144lol_alloc = "0.4.1"
145
146[build-dependencies]
147dotenvy = "0.15.7"
148
149[dev-dependencies]
150insta = { version = "1.40", features = ["yaml"] }
151serde = { version = "1.0", features = ["derive"] }
152regex = "1"