2026-02-02 10:14:13 +08:00
|
|
|
[package]
|
|
|
|
|
name = "rust_api"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
|
|
[lib]
|
2026-10-08 03:57:37 +08:00
|
|
|
name = "rust_api"
|
2026-02-02 10:14:13 +08:00
|
|
|
crate-type = ["cdylib", "staticlib"]
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2026-09-05 20:09:31 +08:00
|
|
|
flutter_rust_bridge = "=2.13.0"
|
|
|
|
|
rquickjs = { version = "0.12", default-features = false }
|
2026-09-25 03:57:05 +08:00
|
|
|
ropey = { version = "1.6.1", default-features = false, features = ["simd"] }
|
2026-09-05 20:09:31 +08:00
|
|
|
|
|
|
|
|
# The IPC server exists so a desktop Core process can talk to the app. Android
|
|
|
|
|
# loads the Core in-process, so nothing below is built into the Android library.
|
|
|
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
2026-10-08 03:57:37 +08:00
|
|
|
interprocess = { version = "2", features = ["tokio"] }
|
|
|
|
|
tokio = { version = "1.36", features = ["io-util", "macros", "rt", "sync"] }
|
2026-09-05 20:09:31 +08:00
|
|
|
global-hotkey = "0.8"
|
|
|
|
|
|
|
|
|
|
[target.'cfg(all(unix, not(target_os = "android")))'.dependencies]
|
|
|
|
|
libc = "0.2"
|
|
|
|
|
|
|
|
|
|
# rquickjs ships pre-generated bindings for every target this project builds
|
|
|
|
|
# except the Android ones, which have to be generated during the build.
|
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
|
|
|
rquickjs = { version = "0.12", default-features = false, features = ["bindgen"] }
|
|
|
|
|
|
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
|
|
|
dispatch2 = "0.3"
|
2026-02-02 10:14:13 +08:00
|
|
|
|
2026-08-05 10:55:33 +08:00
|
|
|
[target.'cfg(windows)'.dependencies]
|
2026-09-05 20:09:31 +08:00
|
|
|
windows-sys = { version = "0.61", features = [
|
|
|
|
|
"Win32_Foundation",
|
|
|
|
|
"Win32_System_Threading",
|
|
|
|
|
"Win32_UI_WindowsAndMessaging",
|
|
|
|
|
] }
|
2026-02-02 10:14:13 +08:00
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
|
opt-level = "s"
|
|
|
|
|
lto = true
|
|
|
|
|
codegen-units = 1
|
|
|
|
|
strip = true
|
|
|
|
|
panic = "abort"
|
|
|
|
|
|
|
|
|
|
[profile.dev]
|
|
|
|
|
opt-level = 0
|
|
|
|
|
|
|
|
|
|
[lints.rust]
|
|
|
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }
|
2026-09-05 20:09:31 +08:00
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
serde_json = "1"
|