2024-10-13 17:41:16 +08:00
|
|
|
|
[package]
|
|
|
|
|
|
name = "coco"
|
2025-12-05 15:43:59 +08:00
|
|
|
|
version = "0.9.1"
|
2024-10-13 17:41:16 +08:00
|
|
|
|
description = "Search, connect, collaborate – all in one place."
|
|
|
|
|
|
authors = ["INFINI Labs"]
|
2025-07-09 16:28:59 +08:00
|
|
|
|
edition = "2024"
|
2024-10-13 17:41:16 +08:00
|
|
|
|
|
|
|
|
|
|
# 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 = "coco_lib"
|
|
|
|
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
|
|
|
|
|
|
|
|
[build-dependencies]
|
2025-02-19 13:02:22 +08:00
|
|
|
|
tauri-build = { version = "2", features = ["default"] }
|
2025-09-22 18:10:33 +08:00
|
|
|
|
cfg-if = "1.0.1"
|
2025-02-19 13:02:22 +08:00
|
|
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
|
default = ["desktop"]
|
|
|
|
|
|
desktop = []
|
2025-03-05 12:22:33 +08:00
|
|
|
|
cargo-clippy = []
|
2025-05-11 14:44:16 +08:00
|
|
|
|
# If enabled, code that relies on pizza_engine will be activated.
|
|
|
|
|
|
#
|
|
|
|
|
|
# Only do this if:
|
|
|
|
|
|
# 1. Pizza engine is listed in the `dependencies` section
|
|
|
|
|
|
#
|
|
|
|
|
|
# ```toml
|
|
|
|
|
|
# [dependencies]
|
|
|
|
|
|
# pizza-engine = { git = "ssh://git@github.com/infinilabs/pizza.git", features = ["query_string_parser", "persistence"] }
|
|
|
|
|
|
# ```
|
|
|
|
|
|
#
|
|
|
|
|
|
# 2. It is a private repo, you have access to it.
|
|
|
|
|
|
#
|
|
|
|
|
|
# So, for external contributors, do NOT enable this feature.
|
|
|
|
|
|
#
|
|
|
|
|
|
# Previously, We listed it in the dependencies and marked it optional, but cargo
|
|
|
|
|
|
# would fetch all the dependencies regardless of wheterh they are optional or not,
|
|
|
|
|
|
# so we removed it.
|
|
|
|
|
|
#
|
|
|
|
|
|
# https://github.com/rust-lang/cargo/issues/4544#issuecomment-1906902755
|
|
|
|
|
|
use_pizza_engine = []
|
2024-10-13 17:41:16 +08:00
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2025-02-07 16:31:05 +08:00
|
|
|
|
pizza-common = { git = "https://github.com/infinilabs/pizza-common", branch = "main" }
|
2025-02-06 11:45:37 +08:00
|
|
|
|
|
2025-06-13 18:06:21 +08:00
|
|
|
|
tauri = { version = "2", features = ["protocol-asset", "macos-private-api", "tray-icon", "image-ico", "image-png"] }
|
2025-02-09 21:51:03 +08:00
|
|
|
|
tauri-plugin-shell = "2"
|
2024-10-13 17:41:16 +08:00
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
2025-04-14 20:30:25 +08:00
|
|
|
|
# Need `arbitrary_precision` feature to support storing u128
|
|
|
|
|
|
# see: https://docs.rs/serde_json/latest/serde_json/struct.Number.html#method.from_u128
|
2025-06-26 18:40:33 +08:00
|
|
|
|
serde_json = { version = "1", features = ["arbitrary_precision", "preserve_order"] }
|
2024-10-28 17:34:48 +08:00
|
|
|
|
tauri-plugin-http = "2"
|
2025-01-10 14:59:03 +08:00
|
|
|
|
tauri-plugin-deep-link = "2.0.0"
|
2025-01-20 19:38:59 +08:00
|
|
|
|
tauri-plugin-store = "2.2.0"
|
2025-02-09 21:51:03 +08:00
|
|
|
|
tauri-plugin-os = "2"
|
|
|
|
|
|
tauri-plugin-dialog = "2"
|
|
|
|
|
|
tauri-plugin-fs = "2"
|
|
|
|
|
|
tauri-plugin-process = "2"
|
|
|
|
|
|
tauri-plugin-drag = "2"
|
2025-08-01 12:53:38 +08:00
|
|
|
|
tauri-plugin-macos-permissions = "2"
|
2025-04-17 16:15:05 +08:00
|
|
|
|
tauri-plugin-fs-pro = "2"
|
2025-03-05 12:22:33 +08:00
|
|
|
|
tauri-plugin-screenshots = "2"
|
2025-09-25 20:55:26 +08:00
|
|
|
|
applications = { git = "https://github.com/infinilabs/applications-rs", rev = "b5fac4034a40d42e72f727f1aa1cc1f19fe86653" }
|
2025-02-21 18:57:32 +08:00
|
|
|
|
tokio-native-tls = "0.3" # For wss connections
|
|
|
|
|
|
tokio = { version = "1", features = ["full"] }
|
2025-05-14 10:07:49 +08:00
|
|
|
|
tokio-tungstenite = { version = "0.20", features = ["native-tls"] }
|
2025-02-21 18:57:32 +08:00
|
|
|
|
hyper = { version = "0.14", features = ["client"] }
|
2025-03-28 13:50:14 +08:00
|
|
|
|
reqwest = { version = "0.12", features = ["json", "multipart"] }
|
2025-02-06 11:45:37 +08:00
|
|
|
|
futures = "0.3.31"
|
2025-02-07 16:31:05 +08:00
|
|
|
|
ordered-float = { version = "4.6.0", default-features = false }
|
2025-02-06 11:45:37 +08:00
|
|
|
|
lazy_static = "1.5.0"
|
|
|
|
|
|
once_cell = "1.20.2"
|
2025-02-07 16:31:05 +08:00
|
|
|
|
notify = "5.0"
|
|
|
|
|
|
async-trait = "0.1.82"
|
|
|
|
|
|
thiserror = "1.0.64"
|
|
|
|
|
|
dirs = "5.0.1"
|
|
|
|
|
|
hostname = "0.3"
|
|
|
|
|
|
plist = "1.7"
|
|
|
|
|
|
base64 = "0.13"
|
2025-02-10 08:14:58 +08:00
|
|
|
|
walkdir = "2"
|
2025-02-21 18:57:32 +08:00
|
|
|
|
log = "0.4"
|
2025-05-27 18:27:53 +08:00
|
|
|
|
strsim = "0.10"
|
2025-02-21 18:57:32 +08:00
|
|
|
|
futures-util = "0.3.31"
|
|
|
|
|
|
http = "1.1.0"
|
|
|
|
|
|
tungstenite = "0.24.0"
|
2025-03-28 13:50:14 +08:00
|
|
|
|
tokio-util = "0.7.14"
|
2025-04-09 17:04:20 +08:00
|
|
|
|
tauri-plugin-windows-version = "2"
|
2025-07-08 15:39:58 +08:00
|
|
|
|
meval = { git = "https://github.com/infinilabs/meval-rs" }
|
2025-04-21 19:40:46 +08:00
|
|
|
|
chinese-number = "0.7"
|
|
|
|
|
|
num2words = "1"
|
2025-05-12 09:33:37 +08:00
|
|
|
|
tauri-plugin-log = "2"
|
|
|
|
|
|
chrono = "0.4.41"
|
2025-05-30 17:18:52 +08:00
|
|
|
|
serde_plain = "1.0.2"
|
|
|
|
|
|
derive_more = { version = "2.0.1", features = ["display"] }
|
|
|
|
|
|
anyhow = "1.0.98"
|
|
|
|
|
|
function_name = "0.3.0"
|
2025-05-31 10:03:19 +08:00
|
|
|
|
regex = "1.11.1"
|
2025-06-16 10:52:01 +08:00
|
|
|
|
borrowme = "0.0.15"
|
2025-06-10 17:26:19 +08:00
|
|
|
|
tauri-plugin-opener = "2"
|
2025-06-17 16:56:06 +08:00
|
|
|
|
async-recursion = "1.1.1"
|
2025-06-26 18:40:33 +08:00
|
|
|
|
zip = "4.0.0"
|
|
|
|
|
|
url = "2.5.2"
|
2025-07-01 19:19:16 +08:00
|
|
|
|
camino = "1.1.10"
|
2025-07-07 19:40:46 +08:00
|
|
|
|
tokio-stream = { version = "0.1.17", features = ["io-util"] }
|
2025-07-17 11:31:19 +08:00
|
|
|
|
sysinfo = "0.35.2"
|
2025-07-29 16:30:12 +08:00
|
|
|
|
indexmap = { version = "2.10.0", features = ["serde"] }
|
feat: sub extension can set 'platforms' now (#847)
Before this commit, sub extensions were not allowed to set their
"platforms" field, this restriction is lifted in this commit.
By allowing this, a group extension can have sub extensions for
different platforms, here is an example (irrelavent fields are omitted
for the sake of simplicity):
```json
{
"name": "Suspend my machine",
"type": "Group",
"platforms": ["macos", "windows"],
"commands": [
{
"name": "Suspend macOS":
"platforms": ["macos"],
"action": {...}
},
{
"name": "Suspend Windows":
"platforms": ["windows"],
"action": {...}
}
]
}
```
While loading or installing extensions, incompatible sub extensions will
be filtered out by Coco, e.g., you won't see that "Suspend Windows"
command if you are on macOS.
An extra check is added in this commit to ensure a sub extensions won't
support the platforms that are incompatible with its main extension.
Even though main extensions and sub extensions can both have "platforms"
specified, the semantics of this field, when not set, differs between them.
For main extensions, it means this extension is compatible with all the
platforms supported by Coco (null == all). For sub extensions, having it
not set implicitly says that this field has the same value as the main
extension's "platforms" field.
The primary reason behind this design is that if we choose the semantics used
by the main extension, treating null as all, all the extensions we currently
have will become invalid, because they are all macOS-only, the main extensions's
"platforms" field is "macos" and sub extensions' "platforms" is not set (null),
they will be equivalent to:
```json
{
"name": "this is macOS-only",
"type": "Group",
"platforms": ["macos"],
"commands": [
{
"name": "How the fxxk can this support all the platforms!"
"platforms": ["macos", "windows", "linux"],
"type": "Command",
"action": {...}
}
]
}
```
This hits exactly the check we mentioned earlier and will be rejected by
Coco. If we have users installed them, the installed extensions will be
treated invalid and rejected by future Coco release, boom, we break backward
compatibility.
Also, the current design actually makes sense. Nobody wants to repeatedly
tell Coco that all the sub extensions support macOS if this can be said only
once:
```json
{
"name": "this is macOS-only",
"platforms": ["macos"],
"commands": [
{
"name": "This supports macOS"
"platforms": ["macos"],
},
{
"name": "This supports macOS too"
"platforms": ["macos"],
},
{
"name": "Guess what! this also supports macOS"
"platforms": ["macos"],
},
{
"name": "Come on dude, do I really to say this platform=macos so many times"
"platforms": ["macos"],
}
]
}
```
2025-07-31 21:49:59 +08:00
|
|
|
|
strum = { version = "0.27.2", features = ["derive"] }
|
2025-08-19 10:43:37 +08:00
|
|
|
|
sys-locale = "0.3.2"
|
2025-08-22 09:19:32 +08:00
|
|
|
|
tauri-plugin-prevent-default = "1"
|
2025-09-08 12:14:11 +08:00
|
|
|
|
oneshot = "0.1.11"
|
|
|
|
|
|
bitflags = "2.9.3"
|
2025-09-22 18:10:33 +08:00
|
|
|
|
cfg-if = "1.0.1"
|
feat: new extension type View (#894)
This commit introduces a new extension type View, which enables developers
to implement extensions with GUI. It is implemented using iframe, developers
can specify the path to the HTML file in the `Extension.page` field, then
Coco will load and render that page when the extension gets opened.
coco-api
We provide a TypeScript library [1] that will contain the APIs developers
need to make the experience better.
We start from file system APIs. Since the embedded HTML page will be loaded
by WebView, which has no access to the local file system, we provide APIs
to bridge that gap. Currently, `fs:read_dir()` is the only API we implemented, more
will come soon.
Permission
As View extensions run user-provided code, we introduce a permision
mechanism to sandbox the code. Developers must manually specify the
permission their extension needs in the "plugin.json" file, e,g.:
"permissions": {
"fs": [
{ "path": "/Users/foo/Downloads", "access": ["read", "write"] },
{ "path": "/Users/foo/Documents", "access": ["read"] }
],
"http": [
{ "host": "api.github.com" }
],
"api": ["fs:read_dir"]
}
Currently, both fs and api permissions are implemented. Permission checks
apply only to View extensions for now; Command extensions will support
them in the future.
[1]: https://github.com/infinilabs/coco-api
2025-09-25 11:12:29 +08:00
|
|
|
|
dunce = "1.0.5"
|
|
|
|
|
|
urlencoding = "2.1.3"
|
|
|
|
|
|
scraper = "0.17"
|
|
|
|
|
|
toml = "0.8"
|
|
|
|
|
|
path-clean = "1.0.1"
|
2025-11-13 19:50:32 +08:00
|
|
|
|
actix-files = "0.6.8"
|
|
|
|
|
|
actix-web = "4.11.0"
|
2025-11-27 10:12:49 +08:00
|
|
|
|
tauri-plugin-clipboard-manager = "2"
|
2025-11-28 17:29:36 +08:00
|
|
|
|
tauri-plugin-zustand = "1"
|
2025-12-02 15:39:44 +08:00
|
|
|
|
snafu = "0.8.9"
|
feat: new extension type View (#894)
This commit introduces a new extension type View, which enables developers
to implement extensions with GUI. It is implemented using iframe, developers
can specify the path to the HTML file in the `Extension.page` field, then
Coco will load and render that page when the extension gets opened.
coco-api
We provide a TypeScript library [1] that will contain the APIs developers
need to make the experience better.
We start from file system APIs. Since the embedded HTML page will be loaded
by WebView, which has no access to the local file system, we provide APIs
to bridge that gap. Currently, `fs:read_dir()` is the only API we implemented, more
will come soon.
Permission
As View extensions run user-provided code, we introduce a permision
mechanism to sandbox the code. Developers must manually specify the
permission their extension needs in the "plugin.json" file, e,g.:
"permissions": {
"fs": [
{ "path": "/Users/foo/Downloads", "access": ["read", "write"] },
{ "path": "/Users/foo/Documents", "access": ["read"] }
],
"http": [
{ "host": "api.github.com" }
],
"api": ["fs:read_dir"]
}
Currently, both fs and api permissions are implemented. Permission checks
apply only to View extensions for now; Command extensions will support
them in the future.
[1]: https://github.com/infinilabs/coco-api
2025-09-25 11:12:29 +08:00
|
|
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
|
tempfile = "3.23.0"
|
2025-01-02 14:41:54 +08:00
|
|
|
|
|
2025-02-18 08:26:52 +08:00
|
|
|
|
[target."cfg(target_os = \"macos\")".dependencies]
|
2025-10-20 15:53:48 +08:00
|
|
|
|
tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2.1" }
|
2025-09-04 11:24:47 +08:00
|
|
|
|
objc2-app-kit = { version = "0.3.1", features = ["NSWindow"] }
|
2025-09-08 12:14:11 +08:00
|
|
|
|
objc2 = "0.6.2"
|
|
|
|
|
|
objc2-core-foundation = {version = "0.3.1", features = ["CFString", "CFCGTypes", "CFArray"] }
|
|
|
|
|
|
objc2-application-services = { version = "0.3.1", features = ["HIServices"] }
|
|
|
|
|
|
objc2-core-graphics = { version = "=0.3.1", features = ["CGEvent"] }
|
2025-11-27 10:12:49 +08:00
|
|
|
|
# macOS-only: used by selection_monitor.rs to check AX trust/prompt
|
|
|
|
|
|
macos-accessibility-client = "0.0.1"
|
2025-08-25 19:29:37 +08:00
|
|
|
|
|
|
|
|
|
|
[target."cfg(target_os = \"linux\")".dependencies]
|
2025-09-22 18:10:33 +08:00
|
|
|
|
gio = "0.21.2"
|
|
|
|
|
|
glib = "0.21.2"
|
|
|
|
|
|
tracker-rs = "0.7"
|
2025-08-26 17:26:17 +08:00
|
|
|
|
which = "8.0.0"
|
2025-09-22 18:10:33 +08:00
|
|
|
|
configparser = "3.1.0"
|
2025-08-25 19:29:37 +08:00
|
|
|
|
|
2025-02-19 13:02:22 +08:00
|
|
|
|
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\"))".dependencies]
|
|
|
|
|
|
tauri-plugin-single-instance = { version = "2.0.0", features = ["deep-link"] }
|
2025-09-08 12:14:11 +08:00
|
|
|
|
serde = { version = "1.0.219", features = ["derive"], optional = true }
|
|
|
|
|
|
|
2025-02-19 13:02:22 +08:00
|
|
|
|
|
2024-10-13 17:41:16 +08:00
|
|
|
|
[profile.dev]
|
|
|
|
|
|
incremental = true # Compile your binary in smaller steps.
|
|
|
|
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
|
|
codegen-units = 1 # Allows LLVM to perform better optimization.
|
|
|
|
|
|
lto = true # Enables link-time-optimizations.
|
|
|
|
|
|
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
|
|
|
|
|
|
panic = "abort" # Higher performance by disabling panic handlers.
|
2024-10-28 17:34:48 +08:00
|
|
|
|
strip = true # Ensures debug symbols are removed.
|
2024-11-30 15:29:00 +08:00
|
|
|
|
|
|
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
2024-12-14 15:38:32 +08:00
|
|
|
|
tauri-plugin-autostart = "^2.2"
|
2024-11-30 15:29:00 +08:00
|
|
|
|
tauri-plugin-global-shortcut = "2"
|
2025-05-07 16:43:44 +08:00
|
|
|
|
tauri-plugin-updater = { git = "https://github.com/infinilabs/plugins-workspace", branch = "v2" }
|
2025-07-24 16:05:36 +08:00
|
|
|
|
# This should be compatible with the semver used by `tauri-plugin-updater`
|
|
|
|
|
|
semver = { version = "1", features = ["serde"] }
|
2025-05-07 18:09:19 +08:00
|
|
|
|
|
|
|
|
|
|
[target."cfg(target_os = \"windows\")".dependencies]
|
2025-06-29 13:32:07 +08:00
|
|
|
|
enigo="0.3"
|
2025-09-22 18:10:33 +08:00
|
|
|
|
windows = { version = "0.61", features = ["Win32_Foundation", "Win32_System_Com", "Win32_System_Ole", "Win32_System_Search", "Win32_UI_Shell_PropertiesSystem", "Win32_Data"] }
|
|
|
|
|
|
windows-sys = { version = "0.61", features = ["Win32", "Win32_System", "Win32_System_Com"] }
|
|
|
|
|
|
|
|
|
|
|
|
[target."cfg(target_os = \"windows\")".build-dependencies]
|
|
|
|
|
|
bindgen = "0.72.1"
|