[package] name = "zorite" version = "0.1.0" edition = "2024" description = "A local-first outliner and daily-journal note app (Logseq-style)." license = "GPL-3.0-or-later" authors = ["packetThrower"] publish = false [[bin]] name = "zorite" path = "src/main.rs" [workspace] members = ["crates/gpui-editor", "crates/gpui-markdown", "crates/gpui-pdf", "crates/gpui-whiteboard", "crates/os-cursors", "crates/os-spellcheck", "crates/ratex-gpui"] resolver = "2" [workspace.dependencies] # ONE shared gpui spec for the app and every crate, so Cargo unifies the # whole workspace on a single gpui graph (git deps only unify when their # specs match exactly). The rev is the one gpui-component's Cargo.toml # pins — to upgrade, take gpui-component's new tip, read the gpui rev # from ITS Cargo.toml, and update these two plus the gpui-component revs # in [dependencies] below. Dependabot's standalone gpui bumps break the # lockstep — close them. gpui = { git = "https://github.com/zed-industries/zed", rev = "1d217ee39d381ac101b7cf49d3d22451ac1093fe" } # Per-platform backend. The Linux `wayland` / `x11` features are NOT # default — without them `gpui::guess_compositor()` hits `unreachable!` # inside a Wayland session before the first paint. Harmless on macOS / # Windows. `runtime_shaders` compiles the Metal shaders at app startup # instead of at build time — as of this gpui rev the build-time path # needs Xcode's separately-downloaded Metal Toolchain, on every dev # machine and CI runner (gpui-component's own workspace makes the same # choice). gpui_platform = { git = "https://github.com/zed-industries/zed", rev = "1d217ee39d381ac101b7cf49d3d22451ac1093fe", features = [ "font-kit", "wayland", "x11", "runtime_shaders", ] } [dependencies] # Our own markdown renderer (clickable wiki-links), a workspace crate. gpui-markdown = { path = "crates/gpui-markdown" } # PDF export (src/export.rs): `markdown` parses (same crate gpui-markdown uses), # oxidize-pdf writes — pure Rust; with default features off it adds only a # handful of small crates (cipher primitives) to the tree. markdown = "1" # The rope type gpui-component's highlighter API takes (one copy in the tree — # keep the version in step with gpui-component's workspace pin). ropey = "2.0.0-beta.1" oxidize-pdf = { version = "4", default-features = false, features = ["compression", "external-images"] } # Rasterizes mermaid/user SVGs for PDF export — the same resvg gpui's own SVG # renderer uses (one copy in the tree; keep the version in step with gpui's). # Pinned to gpui's own resvg minor — bumping past it compiles TWO resvg copies # (gpui pins its own; see Dependabot ignores). Revisit on gpui upgrades. resvg = { version = "0.45", default-features = false, features = ["text", "system-fonts"] } # Our structural math editor + LaTeX renderer (RaTeX port), a workspace crate. # `editor` is on by default, but request it explicitly: zorite hosts the interactive # `MathEditor`, so don't silently break if that default ever changes. ratex-gpui = { path = "crates/ratex-gpui", features = ["editor"] } # Our own page-virtualized PDF viewer (pure-Rust hayro), a workspace crate. # `markup` adds the text-extraction layer + highlight rendering (Logseq-style); # `forms` normalizes AcroForm appearances so form values/checkboxes display. gpui-pdf = { path = "crates/gpui-pdf", features = ["markup", "search", "forms"] } # Our own infinite-canvas whiteboard, a host-agnostic workspace crate. gpui-whiteboard = { path = "crates/gpui-whiteboard" } # Our from-scratch text editor — replaces gpui-component's Input across the note # body editors (native spell-check + custom menus). A workspace crate. gpui-editor = { path = "crates/gpui-editor" } # Native OS spell-check (NSSpellChecker / ISpellChecker), feeding the editor's # diagnostics; a no-op on Linux. A workspace crate. os-spellcheck = { path = "crates/os-spellcheck" } # Custom mouse cursors from below gpui (NSCursor swizzle / WM_SETCURSOR hook / # XCURSOR_* env) — no toolkit fork. Packs are XCursor theme dirs. A workspace crate. os-cursors = { path = "crates/os-cursors" } # Mermaid diagrams: a pure-Rust mermaid → SVG renderer (zed-industries — the # same crate Zed's markdown preview uses; no JS/Node). We rasterize its SVG to a # `gpui::RenderImage` via `cx.svg_renderer()` and cache it like a note image. Git # dep (not on crates.io); pinned to Zed's known-good rev. mermaid-rs-renderer = { git = "https://github.com/zed-industries/mermaid-rs-renderer", rev = "782b89a7da3f0e91e51f98d00a93acba679be6fb", default-features = false } # Decode `data:image/...;base64,...` URIs embedded in Logseq whiteboard `.edn` # files into image bytes on import. Already in the tree (via gpui → usvg). base64 = "0.22" # SQLite backend. `bundled` compiles SQLite from source and links it # statically into the binary — no system libsqlite3 dependency on any # target, and no version skew between dev machines. # bundled-sqlcipher: full SQLite + AES-256 page encryption (PRAGMA key), # vendored OpenSSL so all five CI targets build without system deps. rusqlite = { version = "0.40", features = ["bundled-sqlcipher-vendored-openssl"] } # Local date for the daily-journal title (YYYY-MM-DD). `local-offset` # enables `OffsetDateTime::now_local()` so "today" follows the user's # timezone rather than UTC. Same dep etch341 uses. time = { version = "0.3", features = ["local-offset"] } log = "0.4" env_logger = "0.11" # User-supplied JSON themes (already in the dep graph via gpui-component). serde = { version = "1", features = ["derive"] } serde_json = "1" # --- GUI stack --- # # gpui / gpui_platform come from [workspace.dependencies] (one shared # spec, one unified graph — the rev-lockstep rules live up there). gpui = { workspace = true } gpui_platform = { workspace = true } # Widget library. Pinned to a git rev because the crates.io release # targets a different gpui than our git pin; the rev's Cargo.toml names # the gpui rev to unify against (see the gpui comment above). gpui-component = { git = "https://github.com/longbridge/gpui-component", rev = "1505b1487131adbb443f6c69e87847db35bfa2d1", features = [ # Code-block syntax highlighting (src/highlight.rs): each feature compiles # in one tree-sitter grammar (~0.5-1 MB binary each) — the top languages a # note is likely to quote. JSON ships in the base crate already. "tree-sitter-bash", "tree-sitter-c", "tree-sitter-cpp", "tree-sitter-csharp", "tree-sitter-css", "tree-sitter-diff", "tree-sitter-go", "tree-sitter-html", "tree-sitter-java", "tree-sitter-javascript", "tree-sitter-kotlin", "tree-sitter-lua", "tree-sitter-php", "tree-sitter-python", "tree-sitter-ruby", "tree-sitter-rust", "tree-sitter-sql", "tree-sitter-swift", "tree-sitter-toml", "tree-sitter-tsx", "tree-sitter-typescript", "tree-sitter-yaml", ] } # Lucide icon SVGs. Without `.with_assets(Assets)` at startup, every # gpui-component icon renders as an empty rect. Pin to the same rev so # the icon set tracks the `IconName` enum in gpui-component. gpui-component-assets = { git = "https://github.com/longbridge/gpui-component", rev = "1505b1487131adbb443f6c69e87847db35bfa2d1" } # Parse `file://` URLs into filesystem paths correctly across platforms (Windows # `file:///C:/…`, percent-decoding). Already in the tree via gpui. url = "2" # Decode + downscale note images to display resolution before handing gpui a # GPU-ready `RenderImage` (see `images::ImageStore`). Pinned to gpui's `image` # minor (0.25) so the `Frame` type unifies with `RenderImage::new`, matching the # gpui-pdf crate. image = "0.25" # JPEG fast-path: DCT-scaled decode at a reduced size, so a 12-MP phone photo # doesn't pay a full-resolution decode just to be downscaled (src/images.rs). jpeg-decoder = "0.3" # Boot-time update check (src/updater.rs): sync HTTP against the GitHub Releases # API + semver comparison. Detection-only — never downloads or installs. ureq = { version = "2", features = ["json", "tls"] } semver = "1" # Pure-Rust HEIF/HEIC/AVIF decoder (ente-io): HEVC via scuffle-h265, AV1 via # rav1d. gpui's `image` stack can't decode these, so `images::decode_heif` # routes .heic/.heif/.avif here. NOTE: AGPL-3.0 — the license gate before any # release that bundles this. Grid-tiled primary items are unsupported (rare — # they fall back to the placeholder). Added on the heic-avif-test branch. heic_decoder = { git = "https://github.com/ente-io/heic-decoder" } trash = "5.2.6" # Same story: gpui's http_client pins sha2 0.10 — keep in lockstep. sha2 = "0.10" # v3: per-platform native stores only (macOS Keychain / Windows Credential # Manager / kernel keyutils on Linux) — no dbus/zbus tree. keyring = { version = "3", default-features = false, features = [ "apple-native", "windows-native", "linux-native", ] } # Rich-text copy (src/clipboard.rs): plain + HTML flavors in one clipboard # transaction — gpui's clipboard has no HTML entry. Default features off drops # its image support (we never copy images through it); wayland-data-control # lets Linux Wayland sessions own the selection. arboard = { version = "3.6", default-features = false, features = ["wayland-data-control"] } # Embeds the Windows .exe icon (resources/icon.rc -> resources/icons/icon.ico) # into the PE resource section via build.rs. `embed_resource::compile` is a # no-op on macOS / Linux, so this build-dep is harmless off-Windows. [build-dependencies] embed-resource = "3" # Release profile mirrors the references: smallest, fastest binary. [profile.release] panic = "abort" codegen-units = 1 lto = true opt-level = 3 strip = true # ───────────────────── Packaging (cargo-packager / cargo-wix) ───────────────────── # Drives `cargo packager` (.app/.dmg, NSIS .exe, .deb, .AppImage) and `cargo wix` # (.msi) in .github/workflows/release.yml. A normal `cargo build` ignores these. [package.metadata.packager] product-name = "Zorite" identifier = "io.github.packetThrower.Zorite" category = "Productivity" copyright = "© 2026 packetThrower / Zorite contributors" homepage = "https://github.com/packetThrower/zorite" authors = ["packetThrower"] publisher = "packetThrower" description = "A local-first outliner and daily-journal note app (Logseq-style)." long-description = """ Zorite is a cross-platform (macOS + Windows + Linux) local-first daily-journal \ and outliner note app. Logseq-style: an infinite-scroll journal of daily pages \ plus linked [[wiki-link]] pages, written in Markdown and stored in a local SQLite \ database. Embed and annotate PDFs, drop in images, and search across everything — \ no cloud, no account; your notes stay on your machine.\ """ before-packaging-command = "cargo build --release" icons = ["resources/icons/icon.icns", "resources/icons/icon.png", "resources/icons/icon.ico"] [package.metadata.packager.deb] # Runtime libs for gpui's Wayland + X11 surface + font-kit. Without an explicit # `depends`, a fresh install fails to launch with a missing-.so error. Keep in # lockstep with the fpm --depends list in release.yml's .rpm step. depends = [ "libxkbcommon0", "libxkbcommon-x11-0", "libwayland-client0", "libwayland-cursor0", "libx11-6", "libxcb1", "libxcb-cursor0", "libxcb-randr0", "libxcb-render0", "libxcb-shape0", "libxcb-xfixes0", "libxcb-xkb1", "libfontconfig1", "libfreetype6", ] # Desktop entry (launcher discovery) + hicolor icon. files = { "packaging/linux/zorite.desktop" = "/usr/share/applications/zorite.desktop", "resources/icons/icon.png" = "/usr/share/icons/hicolor/512x512/apps/zorite.png" } [package.metadata.packager.macos] # Hand-curated Info.plist (single-instance launch, high-DPI, stable bundle id). info-plist-path = "resources/Info.plist" minimum-system-version = "11.0" # Ad-hoc codesign (`-`) so Gatekeeper doesn't flag the bundle as "damaged". # Not notarized — first launch is still the right-click -> Open path until an # Apple Developer account lands. signing-identity = "-" # cargo-wix config for the per-arch .msi (built by `cargo wix` in release.yml, on # stable tags only — MSI ProductVersion rejects alphanumeric prereleases). [package.metadata.wix] # Stable per-app GUID. MUST match the UpgradeCode in packaging/windows/wix/main.wxs. # Distinct from every other packetThrower app. Never change once an installer ships. upgrade-guid = "B73F422B-02A5-4E09-A278-E810B2F7B903" include = ["packaging/windows/wix/main.wxs"]