-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
66 lines (60 loc) · 2.84 KB
/
Copy pathCargo.toml
File metadata and controls
66 lines (60 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 독립 저장소 — 자체 workspace 루트(상위 디렉터리 워크스페이스에 흡수되지 않도록 빈 [workspace]).
[workspace]
[package]
name = "tauri-plugin-webview-capture"
version = "0.0.1"
description = "Tauri 2 플러그인 — webview 렌더(DOM+WebGL)를 PNG 로 캡처. 창이 다른 앱에 완전히 가려져도(occluded) 캡처된다(macOS). snapshot / record(연사) / set_occlusion."
edition = "2021"
license = "MIT"
rust-version = "1.77"
repository = "https://github.com/soksak-ai/tauri-plugin-webview-capture"
# 필수 — 이 키가 있어야 build.rs 의 cargo:permission_files 메타데이터가 의존 크레이트
# (앱)의 tauri-build 로 전달돼 webview-capture:default 권한이 인식된다.
links = "tauri-plugin-webview-capture"
categories = ["gui", "multimedia"]
keywords = ["tauri", "plugin", "webview", "screenshot", "capture"]
[dependencies]
tauri = { version = "2" }
serde = { version = "1", features = ["derive"] }
# 캡처한 PNG 프레임을 다시 읽어 영역 명도를 계산(analyze_regions). png 만 — 디코드 전용.
image = { version = "0.25", default-features = false, features = ["png"] }
# snapshot_region 반환 인코딩(디스크 미경유 base64 PNG).
base64 = "0.22"
[build-dependencies]
tauri-plugin = { version = "2", features = ["build"] }
# macOS — ScreenCaptureKit(SCScreenshotManager, macOS 14+)로 창 합성 캡처. CGWindowListCreateImage 는
# macOS 15 에서 obsolete + 블로킹/고부하라 렌더 중엔 WindowServer 와 경합해 멈췄다 → SCK 는 컴포지터에서
# 논블로킹으로 합성 프레임을 받아 child webview 도 빠짐없이 잡고 렌더 중에도 hang 하지 않는다.
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
objc2-foundation = "0.3"
objc2-web-kit = { version = "0.3", features = ["block2"] }
objc2-app-kit = "0.3"
objc2-core-graphics = "0.3"
objc2-core-foundation = "0.3"
objc2-screen-capture-kit = { version = "0.3", features = [
"SCStream",
"SCShareableContent",
"block2",
"objc2-core-graphics",
"objc2-core-foundation",
] }
block2 = "0.6"
# Windows — WebView2 ICoreWebView2.CapturePreview(PNG) → IStream → 파일.
# 버전은 tauri 2.11.x(wry)가 쓰는 바로 그 버전이라야 controller() 반환형과 일치한다.
[target.'cfg(windows)'.dependencies]
webview2-com = "0.38"
windows-core = "0.61"
windows = { version = "0.61", features = [
"Win32_Foundation",
"Win32_System_Com",
"Win32_UI_Shell",
] }
# Linux — WebKitGTK(GTK3) WebViewExt::get_snapshot → cairo::Surface → PNG.
# webkit2gtk 2.0 = wry 가 쓰는 세대. cairo 는 재노출 안 되므로 cairo-rs 직접 의존.
[target.'cfg(target_os = "linux")'.dependencies]
webkit2gtk = "2.0"
# png: ImageSurface::write_to_png 은 feature 게이트다(linux cargo check 실측).
cairo-rs = { version = "0.18", features = ["png"] }
gio = "0.18"
glib = "0.18"