Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

6.3 KB
Raw Blame
[package]
name = "pake"
version = "3.21.0"
description = "🤱🏻 Turn any webpage into a desktop app with Rust."
authors = ["Tw93"]
license = "GPL-3.0-or-later"
repository = "https://github.com/tw93/Pake"
edition = "2021"
rust-version = "1.85.0"

[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "lib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "2.7.6", features = [] }

[dependencies]
serde_json = "1.0.154"
serde = { version = "1.0.229", features = ["derive"] }
# Passkeys (src/app/passkey): base64url, the client data hash, registrable domains.
base64 = "0.23.1"
sha2 = "0.11.1"
psl = "2.1.261"
tokio = { version = "1.54.1", features = ["time", "fs"] }
# Content blocking (feature `content-blocking`): Brave's filter engine, MPL-2.0.
# Without single-thread its Engine is Send + Sync for the WebView2 handler.
adblock = { version = "0.13.6", default-features = false, features = [
  "content-blocking",
  "embedded-domain-resolver",
  "full-regex-handling",
], optional = true }
flate2 = { version = "1.1.11", optional = true }
tauri = { version = "2.12.7", features = [
  "tray-icon",
  "image-ico",
  "image-png",
] }
tauri-plugin-window-state = "2.5.0"
tauri-plugin-http = { version = "2.9.0", features = ["socks"] }
tauri-plugin-global-shortcut = { version = "2.4.1" }
tauri-plugin-opener = { version = "2.7.3" }
tauri-plugin-single-instance = "2.5.5"
tauri-plugin-notification = "2.8.1"

[target.'cfg(target_os = "macos")'.dependencies]
block2 = "0.6"
dispatch = "0.2"
# Reads the system proxy's exceptions list for downloads; already in the
# tree through hyper-util, which reads the proxy without that list.
system-configuration = "0.7"
objc2 = "0.6"
objc2-app-kit = { version = "0.3", features = [
  "NSApplication",
  "NSDockTile",
  "NSEvent",
  "NSResponder",
  "NSScreen",
  "NSWindow",
] }
objc2-foundation = { version = "0.3", features = [
  "NSArray",
  "NSEnumerator",
  "NSError",
  "NSGeometry",
  "NSLocale",
  "NSDate",
  "NSSet",
  "NSData",
  "NSString",
  "NSURL",
  "NSUUID",
  "NSUserNotification",
] }
objc2-web-kit = { version = "0.3", default-features = false, features = [
  "std",
  "block2",
  "WKContentRuleList",
  "WKContentRuleListStore",
  "WKContentWorld",
  "WKFrameInfo",
  "WKScriptMessage",
  "WKScriptMessageHandlerWithReply",
  "WKSecurityOrigin",
  "WKUserContentController",
  "WKWebExtension",
  "WKWebExtensionContext",
  "WKWebExtensionController",
  "WKWebExtensionControllerConfiguration",
  "WKWebExtensionControllerDelegate",
  "WKWebExtensionMatchPattern",
  "WKWebExtensionPermission",
  "WKWebExtensionTab",
  "WKWebExtensionTabConfiguration",
  "WKWebExtensionWindow",
  "WKWebViewConfiguration",
  "WKWebsiteDataStore",
] }

[target.'cfg(target_os = "linux")'.dependencies]
# Used for native WebKitGTK go_back/go_forward on error pages (no page JS).
# Version and features must match what wry resolves, or PlatformWebview::inner
# hands back a WebView from a different crate instance.
webkit2gtk = { version = "=2.0.2", features = ["v2_40"] }
# The camera and microphone question (media_permission.rs). The version wry and
# tao already lock, so its Window is the one WebView::toplevel hands back.
gtk = "0.18"
# Reads the freedesktop color-scheme from the settings portal. Same version
# and features that tauri-plugin-opener and single-instance already lock.
zbus = "5.19"
# WebKitGTK's content filter store, which the safe webkit2gtk crate leaves out.
webkit2gtk-sys = { version = "=2.0.2", features = ["v2_40"], optional = true }

[target.'cfg(windows)'.dependencies]
windows = { version = "0.62.2", features = [
  "Win32_Foundation",
  "Win32_System_Com",
  "Win32_UI_Shell",
  "Win32_UI_WindowsAndMessaging",
] }
windows-sys = { version = "0.61.2", features = [
  "Win32_Foundation",
  "Win32_Globalization",
  "Win32_Graphics_Gdi",
  "Win32_System_Com",
  "Win32_System_Registry",
  "Win32_UI_Input_KeyboardAndMouse",
  "Win32_UI_Shell",
  "Win32_UI_WindowsAndMessaging",
] }
# Used for native WebView2 GoBack/GoForward on error pages (no page JS).
webview2-com = "0.39"
# The generated WebView2 interfaces use this trait for COM interface casts.
windows-core = "0.62.2"

[features]
# Opt-in native Windows test harness; not enabled by packaged apps.
native-download-probe = []
# this feature is used for development builds from development cli
cli-build = []
# Prebuilt template that reads a pake-runtime folder at launch: Contents/Resources
# on macOS, next to the executable elsewhere. The CLI never enables it.
runtime-template = ["content-blocking"]
# Ad, tracker and cookie-notice blocking with the lists in ../filters, which the
# npm package does not ship; the CLI never enables it.
content-blocking = ["dep:adblock", "dep:flate2", "dep:webkit2gtk-sys"]
# Tauri's macOS proxy APIs require macOS 14 or later. The CLI enables this
# feature only after checking the host Darwin version.
macos-proxy = ["tauri/macos-proxy"]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = ["custom-protocol"]
# this feature is used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]

[profile.release]
# Unwind, not abort: under abort Wry's objc2::exception::catch cannot hold, so
# an Objective-C exception that crosses a Rust frame ends the whole app. WebKit
# raises one when an answer arrives for a request a closing or leaving page had
# out, and a sign-in popup closing itself ended the app that way. Costs about
# 1.9 MB per architecture on macOS (12.8 to 14.7 MB on arm64, 2026-11-19).
# Windows and Linux have no such exception and pay more for it (4.5 MB on
# Windows x64), so the CLI builds them with CARGO_PROFILE_RELEASE_PANIC=abort
# (bin/builders/env.ts); a plain `tauri build` there unwinds, which is only
# larger.
panic = "unwind"
codegen-units = 1
lto = "thin"
opt-level = "z"
strip = true

[profile.dev]
# Line tables only for the pake crate: backtraces and breakpoints keep file and
# line, lldb loses local variables. A clean `cargo test --no-run` went from 2.0G
# to 1.7G at the same build time. Set CARGO_PROFILE_DEV_DEBUG=true for full
# variable inspection.
debug = "line-tables-only"

# No debug info for third-party crates: a clean debug build drops from 3.5G to 2.4G.
[profile.dev.package."*"]
debug = false