forked from IsMyPhonePwned/webadb-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
92 lines (78 loc) · 2.33 KB
/
Cargo.toml
File metadata and controls
92 lines (78 loc) · 2.33 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[package]
name = "webadb-rs"
version = "0.1.0"
edition = "2021"
authors = ["ping2a"]
[lib]
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[dependencies]
# WebAssembly bindings (optional: only for webusb feature / WASM builds)
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4", optional = true }
js-sys = { version = "0.3", optional = true }
bugreport_extractor_library = { git = "https://github.com/IsMyPhonePwned/bugreport-extractor-library.git", optional = true }
sigma-zero = { git = "https://github.com/ping2A/sigmazero.git", optional = true }
serde_yaml = { version = "0.9", optional = true }
# WebUSB support (optional)
web-sys = { version = "0.3.91", optional = true, features = [
"console",
"Window",
"Navigator",
"Storage",
"Usb",
"UsbDevice",
"UsbConfiguration",
"UsbInterface",
"UsbAlternateInterface",
"UsbEndpoint",
"UsbInTransferResult",
"UsbOutTransferResult",
"UsbControlTransferParameters",
"UsbDirection",
"UsbRequestType",
"UsbRecipient",
"UsbTransferStatus",
"UsbDeviceFilter",
"UsbDeviceRequestOptions",
] }
# Async runtime for WASM
futures = "0.3"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-wasm-bindgen = { version = "0.6", optional = true }
# Error handling
thiserror = "2.0"
# Crypto for authentication
rsa = { version = "0.9", features = ["sha1", "pem"] }
sha1 = "0.10"
base64 = "0.22"
getrandom = { version = "0.2.16", features = ["std", "js"] }
# Utilities
log = "0.4"
console_error_panic_hook = { version = "0.1", optional = true }
console_log = { version = "1.0", optional = true }
# ZIP file handling (for manual extraction fallback)
zip = { version = "0.6", default-features = false, features = ["deflate"], optional = true }
[dev-dependencies]
wasm-bindgen-test = "0.3"
[profile.release]
opt-level = "s" # Optimize for size
lto = true # Link-time optimization
codegen-units = 1
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Os", "--enable-mutable-globals"]
[features]
default = ["webusb"]
webusb = [
"wasm-bindgen",
"wasm-bindgen-futures",
"js-sys",
"web-sys",
"serde-wasm-bindgen",
"console_error_panic_hook",
"console_log",
"zip",
]
bugreport-analysis = ["bugreport_extractor_library", "sigma-zero", "serde_yaml"]