Files
AI-Studio/runtime/Cargo.toml
T

215 lines
8.7 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "mindwork-ai-studio"
version = "26.11.1"
edition = "2024"
# Not our toolchain, which metadata.txt names, but the oldest Rust which still has to build the runtime: Flathub
# builds the Flatpak with the extension org.freedesktop.Sdk.Extension.rust-stable of the branch named by
# FLATPAK_FREEDESKTOP_VERSION in the pipeline, which lags behind. Clippy refuses every API of the standard library
# which is newer (incompatible_msrv), and Cargo prefers versions of crates which still build with it. Keep the
# minor version only: patch releases add no APIs, and the branches of Flathub differ in the patch. Raise it only
# once Flathub ships a newer Rust, see runtime/AGENTS.md.
rust-version = "1.98"
description = "MindWork AI Studio"
authors = ["Thorsten Sommer"]
[build-dependencies]
tauri-build = { version = "2.7.4", features = [] }
[dependencies]
tauri = { version = "2.12.5", features = [] }
tauri-plugin-window-state = { version = "2.5.0" }
tauri-plugin-shell = "2.6.0"
tauri-plugin-dialog = "2.8.4"
tauri-plugin-opener = "2.7.2"
tauri-plugin-single-instance = "2"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
keyring-core = "1.0.0"
arboard = { version = "3.6.1", features = ["wayland-data-control"] }
tokio = { version = "1.52.3", features = ["rt", "rt-multi-thread", "macros", "process"] }
tokio-stream = { version = "0.1.18", features = ["sync"] }
futures = "0.3.32"
async-stream = "0.3.6"
flexi_logger = "0.31.9"
chrono = "0.4.44"
dirs = "6.0.0"
log = { version = "0.4.33", features = ["kv"] }
once_cell = "1.21.4"
axum = { version = "0.8.9", features = ["http2", "json", "query", "tokio"] }
axum-server = { version = "0.8.0", features = ["tls-rustls"] }
rustls = { version = "0.23.46", default-features = false, features = ["aws_lc_rs"] }
rand = "0.10.2"
rand_chacha = "0.10.0"
subtle = "2.6.1"
base64 = "0.22.1"
aes = "0.9.1"
cbc = "0.2.1"
pbkdf2 = "0.13.0"
hmac = "0.13.0"
sha2 = "0.11.0"
rcgen = { version = "0.14.8", features = ["pem"] }
# The readers are needed to identify a file by its content instead of its extension: zip covers
# OOXML and ODF, cfb the legacy Office formats, txt tells actual text from binary data, and exe
# recognizes executables which carry a harmless extension. Without them, every ZIP-based document
# is only detected as a plain archive.
file-format = { version = "0.29.0", features = ["reader-zip", "reader-cfb", "reader-txt", "reader-exe"] }
# Text files are not always UTF-8: on Windows they are frequently encoded in Windows-1252, whose
# umlauts are single bytes and therefore invalid UTF-8. chardetng guesses the encoding, encoding_rs
# decodes it.
chardetng = "1.0.0"
encoding_rs = "0.8.35"
symphonia = { version = "0.6", default-features = false, features = ["aac", "aiff", "alac", "caf", "flac", "isomp4", "mkv", "mp1", "mp2", "mp3", "ogg", "pcm", "vorbis", "wav"] }
ropus = "=0.12.18"
rubato = { version = "4", default-features = false, features = ["fft_resampler"] }
webm-iterable = "0.6.4"
calamine = "0.37.0"
pdfium-render = "0.9.1"
sys-locale = "0.3.2"
whoami = "2.1.2"
cfg-if = "1.0.4"
pptx-to-md = "2.0.0"
docx-to-md = "0.2.0"
# Reads the sections of OneNote notebooks (.one) page by page. It reads the file on demand instead of
# loading it into memory, and so does every image it hands out. It is licensed under the MPL-2.0, which
# is why its notices ship with the app, cf. resources/notices/THIRD_PARTY_DOCUMENT_NOTICES.md. Packages
# (.onepkg) stay unsupported: the `onepkg` feature unpacks the whole archive into memory.
onenote_parser = "2.1.0"
# The OneNote parser takes the path of a section as a `TypedPath` of this version without re-exporting it.
typed-path = "0.12.4"
tempfile = "3.27.0"
strum_macros = "0.28.0"
sysinfo = "0.39.6"
bytes = "1.12.1"
qdrant-edge = "0.8.0"
# Prompt-injection detection. `regex` gives us linear-time matching without backtracking, so
# a hostile document cannot make a scan blow up, and `aho-corasick` matches the ~1600 fixed
# phrases in one pass no matter how long that list grows.
regex = "1.13.1"
aho-corasick = "1.1.5"
toml = "1.1.4"
image = { version = "0.25.10", default-features = false, features = ["jpeg", "png", "webp", "gif", "bmp", "tiff"] }
tokenizers = "0.23.1"
[dev-dependencies]
# Sends requests through the runtime API router in tests, without starting a server.
tower = { version = "0.5.2", features = ["util"] }
[patch.crates-io]
# Issue: This repo was not updated since 2020. The rand crate was outdated. We patched it to use a newer version of rand.
# State: There is a PR for a long time, but it was not merged. We use the git version for now. Qdrant Edge still depends
# on this crate in version 0.1.2, so the patch stays relevant: https://github.com/asimihsan/permutation-iterator-rs/pull/14
permutation_iterator = { git = "https://github.com/SommerEngineering/permutation-iterator-rs.git", rev = "76836ed316d18dfef530ba908f58481c343e80d7" }
[target.'cfg(target_os = "windows")'.dependencies]
windows-registry = "0.6.1"
windows-native-keyring-store = "1.1.0"
# The share sheet and the interface size hand the window handle they get from Tauri to the Windows API
# of this crate. Both sides must use the same version of `windows`, otherwise the handle types differ and
# the build fails on Windows. Keep this pin, and `windows-collections` with it, at the version Tauri uses.
windows = { version = "=0.62.2", features = ["ApplicationModel_DataTransfer", "Foundation", "Foundation_Collections", "Storage", "Storage_Streams", "Win32_Foundation", "Win32_Graphics_Gdi", "Win32_System_WinRT", "Win32_UI_HiDpi", "Win32_UI_Shell"] }
windows-collections = "=0.3.2"
[target.'cfg(target_os = "macos")'.dependencies]
apple-native-keyring-store = { version = "1.0.0", features = ["keychain"] }
objc2 = "0.6.3"
objc2-app-kit = { version = "0.3.2", features = ["NSResponder", "NSSharingService", "NSView", "NSWorkspace"] }
objc2-foundation = { version = "0.3.2", features = ["NSArray", "NSBundle", "NSGeometry", "NSString", "NSURL"] }
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "0.13.12", default-features = false, features = ["tokio", "open_uri", "global_shortcuts"] }
dbus-secret-service-keyring-store = { version = "1.0.0", features = ["crypto-rust"] }
dbus-secret-service = "4.1.0"
gtk = "0.18"
webkit2gtk = { version = "2.0.2", features = ["v2_8"] }
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2.14.1"
[features]
custom-protocol = ["tauri/custom-protocol"]
# Media normalization is CPU-heavy even when the application itself is built for development.
# Keep release settings untouched while optimizing the hot decoder/resampler/container crates.
[profile.dev.package.symphonia-core]
opt-level = 3
[profile.dev.package.symphonia-format-mkv]
opt-level = 3
[profile.dev.package.ropus]
opt-level = 3
[profile.dev.package.rubato]
opt-level = 3
[profile.dev.package.webm-iterable]
opt-level = 3
# Scanning a document for prompt injections is just as CPU-heavy, and unoptimized matching
# engines dominate it completely: a 1580-page PDF takes about 3 seconds to scan when these
# crates are optimized and over a minute when they are not. Without this, every developer
# measuring the app against a large document measures the build profile instead of the scan.
# The engines are `regex-automata` and `aho-corasick`; `regex` is the wrapper around the
# former, `regex-syntax` compiles the ~1600 phrases once at startup, and `memchr` provides
# the SIMD prefilters both engines rely on.
[profile.dev.package.regex]
opt-level = 3
[profile.dev.package.regex-automata]
opt-level = 3
[profile.dev.package.regex-syntax]
opt-level = 3
[profile.dev.package.aho-corasick]
opt-level = 3
[profile.dev.package.memchr]
opt-level = 3
# Preparing images is CPU-heavy as well: AI Studio decodes a picture, scales it down to 2560 pixels,
# and encodes it again, both for the AI and for the slides of the Slide Assistant. A photo of
# 2912 × 1632 pixels saved as PNG takes about 0.12 seconds in a release build, 6.6 seconds in a
# development build without this, and about 0.5 seconds with it; almost all of that is scaling and
# encoding. `image` does the scaling; `png`, `fdeflate`, `flate2`, `miniz_oxide`, `crc32fast`,
# and `simd-adler32` read and write PNG files; `zune-jpeg` and `zune-core` read JPEG files; and
# `image-webp` reads and writes WebP files.
[profile.dev.package.image]
opt-level = 3
[profile.dev.package.png]
opt-level = 3
[profile.dev.package.fdeflate]
opt-level = 3
[profile.dev.package.flate2]
opt-level = 3
[profile.dev.package.miniz_oxide]
opt-level = 3
[profile.dev.package.crc32fast]
opt-level = 3
[profile.dev.package.simd-adler32]
opt-level = 3
[profile.dev.package.zune-jpeg]
opt-level = 3
[profile.dev.package.zune-core]
opt-level = 3
[profile.dev.package.image-webp]
opt-level = 3