Cargo.toml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [package]
  2. name = "auto-record"
  3. version = "0.1.0"
  4. description = "A Tauri App"
  5. authors = ["you"]
  6. edition = "2021"
  7. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  8. [lib]
  9. # The `_lib` suffix may seem redundant but it is necessary
  10. # to make the lib name unique and wouldn't conflict with the bin name.
  11. # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
  12. name = "auto_record_lib"
  13. crate-type = ["staticlib", "cdylib", "rlib"]
  14. [build-dependencies]
  15. tauri-build = { version = "2", features = [] }
  16. [dependencies]
  17. # `unstable` feature 用于启用多 webview API(Window::add_child、WebviewBuilder、
  18. # Manager::get_window/webviews 等),仍是 Tauri 2 稳定版 crate,只是这些 API 标记为不稳定
  19. tauri = { version = "2", features = ["protocol-asset", "unstable"] }
  20. tauri-plugin-opener = "2"
  21. # 全局快捷键:F9/F10/F11 控制录制开始/暂停/停止
  22. tauri-plugin-global-shortcut = "2"
  23. # SQLite 持久化任务列表(前端通过 @tauri-apps/plugin-sql 调用)
  24. tauri-plugin-sql = { version = "2", features = ["sqlite"] }
  25. serde = { version = "1", features = ["derive"] }
  26. serde_json = "1"
  27. # 用于解析前端传来的 url 字符串后再交给 webview.navigate
  28. url = "2"
  29. # 截图链路:解码 CDP 返回的 base64 PNG
  30. base64 = "0.22"
  31. # 异步运行时(与 tauri::async_runtime 兼容;显式启用 time/sync feature 供 sleep 与 oneshot 用)
  32. tokio = { version = "1", features = ["time", "sync", "process", "io-util", "rt-multi-thread"] }
  33. # 截图 / 录制相关的统一错误处理
  34. anyhow = "1"
  35. # 录制会话标识;不直接落盘的 raw 文件用 uuid 命名避免并发冲突
  36. uuid = { version = "1", features = ["v4"] }
  37. widestring = "1.2.1"
  38. # ------------------ Windows 平台专属 ------------------
  39. # 用 webview2-com 直接拿 ICoreWebView2 调 CallDevToolsProtocolMethod 跑 CDP(整页截图)。
  40. # 版本号需要跟 tauri 当前依赖的 wry 内部使用的 webview2-com 大版本号一致;
  41. # 若 cargo check 报 ICoreWebView2 类型冲突,运行 `cargo tree -p webview2-com`
  42. # 查看实际版本并对齐这里。
  43. [target.'cfg(windows)'.dependencies]
  44. webview2-com = "0.38"
  45. windows = { version = "0.61", features = [
  46. "Win32_Foundation",
  47. "Win32_System_Com",
  48. ] }