[package] name = "margin-app" version = "0.1.17" description = "A Tauri App" authors = ["you"] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] # The `_lib` suffix may seem redundant but it is necessary # to make the lib name unique and wouldn't conflict with the bin name. # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 name = "margin_app_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] tauri-build = { version = "2", features = [] } [dependencies] tauri = { version = "2", features = [] } tauri-plugin-opener = "2" tauri-plugin-dialog = "2" tauri-plugin-updater = "2" tauri-plugin-process = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" base64 = "0.22" zip = "2" fontdb = "0.23" typst = "0.14.2" typst-pdf = "0.14.2" typst-as-lib = "0.15.5" # Pinned exactly: the [patch] stubs below are tied to this version's burn/cubecl graph. A minor # bump could silently invalidate the patch ("unused") and pull the broken CUDA subtree back in, # so bump deliberately and re-audit the stubs. (see [patch.crates-io]) harper-core = { version = "=2.5.0", features = ["concurrent"] } reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json"] } sha2 = "0.10" rand = "0.8" url = "2" # Spelling on macOS uses the system NSSpellChecker (same engine as TextEdit/Safari): far better # vocabulary than the bundled Hunspell dictionary and it skips URLs. These objc2 crates are already # in the graph via Tauri, so this adds nothing new to the build. [target.'cfg(target_os = "macos")'.dependencies] objc2 = "0.6" objc2-app-kit = { version = "0.3", features = [ "NSSpellChecker", "NSApplication", "NSEvent", "NSMenu", "NSMenuItem", "NSResponder", "NSWritingToolsCoordinator", ] } objc2-foundation = { version = "0.3", features = ["NSString", "NSArray", "NSRange", "NSTextCheckingResult"] } # Other platforms fall back to the bundled Hunspell dictionary via spellbook. [target.'cfg(not(target_os = "macos"))'.dependencies] spellbook = "0.4" # harper-core transitively declares an optional, disabled `burn-cuda` (CUDA backend). # Cargo still version-resolves that dead subtree, which currently fails (broken tracel-llvm # prereleases) and links-collides with `zip`'s lzma. Replace it with an empty stub so the # whole cubecl/tracel/CUDA subtree leaves the graph. The `cuda` feature is off, so nothing here # is ever compiled. [patch.crates-io] burn-cuda = { path = "stubs/burn-cuda" } cubecl-cpu = { path = "stubs/cubecl-cpu" } # Optimize dependencies even in dev builds. Harper's grammar engine (and its burn-ndarray POS # tagger) is ~10x slower unoptimized, which made `tauri dev` grammar checks take seconds. This # compiles deps at opt-level 3 while keeping margin-app itself unoptimized, so incremental # rebuilds of our own code stay fast. First build after this is slower (deps recompile once). [profile.dev.package."*"] opt-level = 3