967a7833ca
Report crashes and unhandled errors from every layer to one Sentry project via a single build-time SENTRY_DSN (empty => disabled, so local and fork builds do not report): - JS/WebView + Rust panics via tauri-plugin-sentry (rustls transport; minidump handler desktop-only). - Android native (JVM/NDK/ANR) via sentry-android 8.47.0 with manifest auto-init (excludes the discontinued lifecycle-common-java8 transitive). - iOS native via sentry-cocoa started from a tracked SentrySupport/+load bootstrap that reads the DSN from a Rust readest_sentry_dsn() FFI (no generated-file edits). - SENTRY_DSN resolved at build time from the environment, then .env.local, then .env (build.rs bakes it via cargo:rustc-env; build.gradle.kts for Android). CI passes the SENTRY_DSN secret through the existing .env.local step. Crashes + errors only: traces sample rate 0, no session replay, no PII. Symbolication (source maps / ProGuard / dSYM upload) is a follow-up. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
141 lines
5.1 KiB
TOML
141 lines
5.1 KiB
TOML
[package]
|
|
name = "Readest"
|
|
version = "0.2.2"
|
|
description = "Your online library"
|
|
authors = ["Bilingify LLC"]
|
|
license = ""
|
|
repository = ""
|
|
edition = "2021"
|
|
rust-version = "1.77.2"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[lib]
|
|
name = "readestlib"
|
|
crate-type = ["staticlib", "cdylib", "lib"]
|
|
|
|
[features]
|
|
# Internal feature to suppress warnings from old objc crate
|
|
cargo-clippy = []
|
|
# Enable WebDriver plugin for E2E testing (use with `tauri build --debug --features webdriver`)
|
|
webdriver = ["tauri-plugin-webdriver"]
|
|
devtools = ["tauri/devtools"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
serde_json = "1.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
semver = "1"
|
|
base64 = "0.22"
|
|
minisign-verify = "0.2"
|
|
log = "0.4"
|
|
thiserror = "2"
|
|
walkdir = "2"
|
|
tokio = { version = "1", features = ["fs"] }
|
|
tokio-util = { version = "0.7", features = ["codec"] }
|
|
futures-util = "0.3"
|
|
futures = "0.3.31"
|
|
read-progress-stream = "1.0.0"
|
|
reqwest = { version = "0.12", default-features = false, features = [
|
|
"json",
|
|
"stream",
|
|
] }
|
|
tauri = { version = "2", features = [ "protocol-asset" ] }
|
|
tauri-build = "2"
|
|
tauri-plugin-log = "2"
|
|
tauri-plugin-fs = "2"
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-os = "2"
|
|
tauri-plugin-http = { version = "2", features = ["dangerous-settings"] }
|
|
tauri-plugin-shell = "2"
|
|
tauri-plugin-process = "2"
|
|
tauri-plugin-oauth = "2"
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-deep-link = "2"
|
|
tauri-plugin-sign-in-with-apple = "1.0.2"
|
|
tauri-plugin-haptics = "2"
|
|
tauri-plugin-biometric = "2"
|
|
tauri-plugin-persisted-scope = "2"
|
|
tauri-plugin-native-bridge = { path = "./plugins/tauri-plugin-native-bridge" }
|
|
tauri-plugin-native-tts = { path = "./plugins/tauri-plugin-native-tts" }
|
|
tauri-plugin-webview-upgrade = { path = "./plugins/tauri-plugin-webview-upgrade" }
|
|
tauri-plugin-websocket = "2"
|
|
tauri-plugin-sharekit = "0.3"
|
|
tauri-plugin-clipboard-manager = "2"
|
|
tauri-plugin-device-info = "1.0.1"
|
|
tauri-plugin-turso = { path = "./plugins/tauri-plugin-turso" }
|
|
tauri-plugin-webdriver = { version = "0.2", optional = true }
|
|
|
|
# Native EPUB import path (Q1): zip + quick-xml + md5.
|
|
# Used by `epub_parser::parse_epub_metadata` (partialMD5 + downscaled
|
|
# cover) and `parse_epub_full` (OPF/nav/ncx prefetch + entry-size
|
|
# table) to do the mechanical zip work without ferrying multi-MB blobs
|
|
# across the JS<->Rust IPC boundary. Pure-Rust crates so they ship to
|
|
# every Tauri target (desktop, iOS, Android) without extra system deps.
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|
|
quick-xml = "0.36"
|
|
md-5 = "0.10"
|
|
# Used by `epub_parser::read_zip_entry` as a fallback when an OPF/manifest
|
|
# href is percent-encoded (e.g. spaces as %20, CJK paths) but the zip stores
|
|
# the raw decoded bytes — or vice versa. Already in our transitive dep graph
|
|
# (reqwest pulls it), so adding it explicitly costs nothing.
|
|
percent-encoding = "2"
|
|
|
|
# Cover thumbnail generation (Q2). We decode the cover image extracted
|
|
# from the EPUB and, when its long edge exceeds the library-grid size,
|
|
# re-encode a smaller JPEG so the on-disk `cover.png` is suitable for
|
|
# webview rendering (~30-60 KB instead of multi-MB). Default features
|
|
# are disabled to keep the binary lean — we only need decoders for the
|
|
# formats EPUBs actually use (jpeg/png/gif) plus the JPEG encoder.
|
|
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "gif"] }
|
|
|
|
# Native MOBI/AZW/AZW3 import path. Mirrors the EPUB fast-path: parse
|
|
# PalmDB + MobiHeader + EXTH in Rust to extract title/author/publisher/
|
|
# description/isbn/asin/subjects/language and the cover image, then
|
|
# return them to JS so the importer skips the foliate-js MOBI parser
|
|
# (which has to inflate the whole record stream up-front on the iOS
|
|
# WebView). Pure-Rust crate, ships to every Tauri target.
|
|
mobi = "0.8"
|
|
|
|
# Crash/error reporting. `tauri-plugin-sentry` injects @sentry/browser into
|
|
# every webview and routes browser + Rust panic events through one client; it
|
|
# re-exports sentry-rust-minidump for desktop native crashes. `rustls` avoids
|
|
# the native-tls/OpenSSL system dependency so the transport builds for
|
|
# Android/iOS. Native mobile crashes are handled by sentry-android/-cocoa.
|
|
sentry = { version = "0.42", default-features = false, features = [
|
|
"backtrace",
|
|
"contexts",
|
|
"panic",
|
|
"reqwest",
|
|
"rustls",
|
|
] }
|
|
tauri-plugin-sentry = "0.5"
|
|
|
|
[target."cfg(target_os = \"macos\")".dependencies]
|
|
rand = "0.8"
|
|
cocoa = "0.25"
|
|
objc = "0.2.7"
|
|
objc-foundation = "0.1.1"
|
|
objc_id = "0.1.1"
|
|
block = "0.1.6"
|
|
objc2 = "0.6"
|
|
objc2-authentication-services = "0.3"
|
|
objc2-foundation = { version = "0.3", features = ["NSError", "NSArray"] }
|
|
|
|
[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
|
|
tauri-plugin-cli = "2"
|
|
tauri-plugin-single-instance = "2"
|
|
tauri-plugin-updater = "2"
|
|
tauri-plugin-window-state = "2"
|
|
discord-rich-presence = "1.0.0"
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# Resolve the user's default browser from the registry for the cold-browser
|
|
# OAuth-redirect fallback (see src/spawn_fresh_browser.rs).
|
|
winreg = "0.52"
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
libc = "0.2"
|