[package] name = "auto-record" version = "0.1.0" description = "A Tauri App" authors = ["you"] edition = "2021" # 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 = "auto_record_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] tauri-build = { version = "2", features = [] } [dependencies] # `unstable` feature 用于启用多 webview API(Window::add_child、WebviewBuilder、 # Manager::get_window/webviews 等),仍是 Tauri 2 稳定版 crate,只是这些 API 标记为不稳定 tauri = { version = "2", features = ["protocol-asset", "unstable"] } tauri-plugin-opener = "2" # 全局快捷键:F9/F10/F11 控制录制开始/暂停/停止 tauri-plugin-global-shortcut = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" # 用于解析前端传来的 url 字符串后再交给 webview.navigate url = "2" # 截图链路:解码 CDP 返回的 base64 PNG base64 = "0.22" # 异步运行时(与 tauri::async_runtime 兼容;显式启用 time/sync feature 供 sleep 与 oneshot 用) tokio = { version = "1", features = ["time", "sync", "process", "io-util", "rt-multi-thread"] } # 截图 / 录制相关的统一错误处理 anyhow = "1" # 录制会话标识;不直接落盘的 raw 文件用 uuid 命名避免并发冲突 uuid = { version = "1", features = ["v4"] } widestring = "1.2.1" # ------------------ Windows 平台专属 ------------------ # 用 webview2-com 直接拿 ICoreWebView2 调 CallDevToolsProtocolMethod 跑 CDP(整页截图)。 # 版本号需要跟 tauri 当前依赖的 wry 内部使用的 webview2-com 大版本号一致; # 若 cargo check 报 ICoreWebView2 类型冲突,运行 `cargo tree -p webview2-com` # 查看实际版本并对齐这里。 [target.'cfg(windows)'.dependencies] webview2-com = "0.38" windows = { version = "0.61", features = [ "Win32_Foundation", "Win32_System_Com", ] }