[package] name = "weaver-app" version = "0.1.0" authors = ["Orual "] edition = "2024" [lib] name = "weaver_app" path = "src/lib.rs" [[bin]] name = "weaver-app" path = "src/main.rs" [[bin]] name = "editor_worker" path = "src/bin/editor_worker.rs" required-features = ["web"] [[bin]] name = "embed_worker" path = "src/bin/embed_worker.rs" required-features = ["web"] [features] default = ["web", "fullstack-server", "use-index", "pckt"] # Fullstack mode with SSR and server functions fullstack-server = ["dioxus/fullstack"] # Enable pckt/site.standard document rendering pckt = ["weaver-renderer/pckt"] # Route-based WASM bundle splitting. Currently broken: causes server/client serialization # mismatches (bool vs String) in use_server_future, especially in navbar. Possibly related # to SmolStr niche optimization or type registry getting confused across module boundaries. # Revisit when dioxus matures this feature. Run with: dx serve --wasm-split wasm-split = ["dioxus/wasm-split"] # Use weaver-index for reads (proxied when authenticated) use-index = ["weaver-common/use-index"] web = ["dioxus/web", "dioxus-primitives/web"] desktop = ["dioxus/desktop"] mobile = ["dioxus/mobile"] server = [ "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"] collab-worker = ["weaver-common/iroh"] [dependencies] dashmap = "6.1.0" dioxus = { version = "0.7.1", features = ["router"] } weaver-common = { path = "../weaver-common", features = ["cache", "perf"] } weaver-editor-core = { path = "../weaver-editor-core" } weaver-editor-browser = { path = "../weaver-editor-browser", features = ["dioxus"] } weaver-editor-crdt = { path = "../weaver-editor-crdt" } jacquard = { workspace = true}#, features = ["streaming"] } jacquard-lexicon = { workspace = true } jacquard-identity = { workspace = true } jacquard-axum = { workspace = true, optional = true } weaver-api = { path = "../weaver-api", features = ["com_whtwnd"] } markdown-weaver = { workspace = true } weaver-renderer = { path = "../weaver-renderer", features = ["themes", "syntax-highlighting", "syntax-css"] } n0-future = { workspace = true } dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false, features = ["router"] } axum = { version = "0.8.6", optional = true } axum-extra = { version = "0.10", optional = true, features = ["typed-header"] } tower = { version = "0.5", optional = true } tower-http = { version = "0.6", optional = true, features = ["trace"] } mime-sniffer = {version = "^0.1"} chrono = { version = "0.4" } serde = { version = "1.0" } serde_json = "1.0" humansize = "2.0.0" base64 = "0.22" http = "1.3" reqwest = { version = "0.12", default-features = false, features = ["json"] } dioxus-free-icons = { version = "0.9", features = ["font-awesome-brands"] } # syntect configured per-target below # diesel = { version = "2.3", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "chrono", "serde_json"] } # diesel_migrations = { version = "2.3", features = ["sqlite"] } tokio = { version = "1.28", features = ["sync"] } serde_html_form = "0.2.8" regex-lite = "0.1" tracing.workspace = true serde_ipld_dagcbor = { version = "0.6" } loro = "1.9.1" markdown-weaver-escape = { workspace = true } web-time = "1.1" urlencoding = "2.1" tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "registry"] } dioxus-sdk = { version = "0.7", features = ["time"] } futures-util = "0.3" # OG image generation (server-only) resvg = { version = "0.44", optional = true } usvg = { version = "0.44", optional = true } tiny-skia = { version = "0.11", optional = true } textwrap = { version = "0.16", optional = true } askama = { version = "0.12", optional = true } fontdb = { version = "0.22", optional = true } # CSS minification (server-only) lightningcss = { version = "1.0.0-alpha.68", optional = true } [target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] webbrowser = "1.0.6" reqwest = { version = "0.12", default-features = false, features = ["json"] } ring = { version = "0.17", default-features = false, features = ["alloc"] } # Native: full syntect with onig syntect = { workspace = true, default-features = false, features = [ "parsing", "html", "default-syntaxes", "default-themes", "plist-load", "regex-onig" ] } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] reqwest = { version = "0.12", default-features = false, features = ["json"] } tracing-wasm = "0.2" # WASM: syntect with fancy-regex (no onig for wasm) syntect = { workspace = true, default-features = false, features = [ "parsing", "html", "default-syntaxes", "default-themes", "plist-load", "regex-fancy" ] } #sqlite-wasm-rs = { version = "0.4", default-features = false, features = ["precompiled", "relaxed-idb"] } time = { version = "0.3", features = ["wasm-bindgen"] } console_error_panic_hook = "0.1" weaver-embed-worker = { path = "../weaver-embed-worker" } chrono = { version = "0.4", features = ["wasmbind"] } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" web-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"] } js-sys = "0.3" gloo-storage = "0.3" gloo-timers = "0.3" gloo-worker = { version = "0.5", features = ["futures"] } postcard = "1.1" ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js"]} getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] } lol_alloc = "0.4.1" [build-dependencies] dotenvy = "0.15.7" [dev-dependencies] insta = { version = "1.40", features = ["yaml"] } serde = { version = "1.0", features = ["derive"] } regex = "1"