Cargo.toml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # 原生 message/ask/confirm 弹窗(前端通过 @tauri-apps/plugin-dialog 调用)
  22. tauri-plugin-dialog = "2"
  23. # 全局快捷键:F9/F10/F11 控制录制开始/暂停/停止
  24. tauri-plugin-global-shortcut = "2"
  25. # SQLite 持久化任务列表(前端通过 @tauri-apps/plugin-sql 调用)
  26. tauri-plugin-sql = { version = "2", features = ["sqlite"] }
  27. serde = { version = "1", features = ["derive"] }
  28. serde_json = "1"
  29. # 用于解析前端传来的 url 字符串后再交给 webview.navigate
  30. url = "2"
  31. # 截图链路:解码 CDP 返回的 base64 PNG
  32. base64 = "0.22"
  33. # 异步运行时(与 tauri::async_runtime 兼容;显式启用 time/sync feature 供 sleep 与 oneshot 用)
  34. tokio = { version = "1", features = ["time", "sync", "process", "io-util", "rt-multi-thread"] }
  35. # 截图 / 录制相关的统一错误处理
  36. anyhow = "1"
  37. # 录制会话标识;不直接落盘的 raw 文件用 uuid 命名避免并发冲突
  38. uuid = { version = "1", features = ["v4"] }
  39. widestring = "1.2.1"
  40. # ------------------ Windows 平台专属 ------------------
  41. # 用 webview2-com 直接拿 ICoreWebView2 调 CallDevToolsProtocolMethod 跑 CDP(整页截图)。
  42. # 版本号需要跟 tauri 当前依赖的 wry 内部使用的 webview2-com 大版本号一致;
  43. # 若 cargo check 报 ICoreWebView2 类型冲突,运行 `cargo tree -p webview2-com`
  44. # 查看实际版本并对齐这里。
  45. [target.'cfg(windows)'.dependencies]
  46. webview2-com = "0.38"
  47. windows = { version = "0.61", features = [
  48. "Win32_Foundation",
  49. "Win32_System_Com",
  50. ] }