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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
[]
= "win-auto-utils"
= "0.2.6"
= "2021"
= "Universal Windows automation utilities with memory, window, input, and color operations"
= ["CC"]
= "MIT"
= "https://github.com/creayhx/win-auto-utils"
= "https://docs.rs/win-auto-utils"
= "README.md"
= ["windows", "automation", "memory", "input", "hook"]
= ["os::windows-apis", "development-tools", "api-bindings"]
= [".git/*", ".github/*", "target/*", "docs/*"]
[]
= "win_auto_utils"
= "src/lib.rs"
= ["rlib"]
[]
= { = "0.62", = false, = true }
# Optional dependencies for advanced features
= { = "2.8", = true }
= { = "1.12", = true }
# image: Core image processing library (used by template_matcher)
= { = "0.25", = false, = true }
# imageproc: Image processing algorithms including template matching (used by template_matcher)
= { = "0.25", = false, = true }
[]
# Default to standard features (minimal dependencies, fast compilation)
= ["standard"]
# === Atomic Functional Modules (Independent) ===
# Process management and handle aggregation
# Note: This is a high-level module that integrates hwnd/hdc/snapshot/handle functionality.
# If you only need process enumeration, use the 'snapshot' feature instead.
= [
"dep:windows",
"hwnd", # For window handle lookup by PID
"hdc", # For DC management (get/release desktop/window DCs)
"snapshot", # For PID lookup by process name
"handle", # For opening/closing process handles
]
# Window handle querying utilities
= [
"dep:windows",
"windows/Win32_UI_WindowsAndMessaging",
"windows/Win32_Foundation",
]
# Window manipulation and enumeration
= [
"dep:windows",
"utils_chars", # Required for string_to_pcwstr
"windows/Win32_UI_WindowsAndMessaging",
"windows/Win32_Graphics_Gdi", # Required for some window DC operations
]
# Process and module enumeration (ToolHelp32 API)
= [
"dep:windows",
"utils_chars", # Required for char_array_to_string
"windows/Win32_System_Threading",
"windows/Win32_System_Diagnostics_ToolHelp",
]
# Process handle management (OpenProcess, CloseHandle)
= [
"dep:windows",
"windows/Win32_Foundation",
"windows/Win32_System_Threading",
]
# Device Context (DC) management
= [
"dep:windows",
"windows/Win32_Graphics_Gdi",
"windows/Win32_UI_WindowsAndMessaging", # For GetDesktopWindow
]
# Keyboard input
= [
"dep:windows",
"utils_key_code", # Only need key_code function, not full utils
"utils_thread", # For sleep_ms in delay operations
"windows/Win32_UI_Input_KeyboardAndMouse",
"windows/Win32_UI_WindowsAndMessaging",
]
# Mouse input
= [
"dep:windows",
"utils_thread", # For sleep_ms in delay operations
"windows/Win32_UI_Input_KeyboardAndMouse",
"windows/Win32_UI_WindowsAndMessaging",
]
# Clipboard operations - Read/write text to system clipboard
= [
"dep:windows",
"windows/Win32_System_DataExchange", # For OpenClipboard, GetClipboardData, SetClipboardData
"windows/Win32_System_Memory", # For GlobalAlloc, GlobalLock, GlobalUnlock
]
# Memory operations - Read/write process memory
= [
"dep:windows",
"windows/Win32_Foundation", # For HANDLE, BOOL types
"windows/Win32_System_Diagnostics_Debug", # For ReadProcessMemory, WriteProcessMemory
"windows/Win32_System_Threading", # For OpenProcess, PROCESS_VM_READ/WRITE/OPERATION
]
# Color picking from screen (requires Windows GDI)
= ["dep:windows", "windows/Win32_Graphics_Gdi"]
# Color finding in pixel buffers (pure Rust, zero dependencies)
# Note: For screen capture integration, enable dxgi feature which is automatically enabled
= ["dxgi"]
# === Advanced Modules ===
# DXGI screen capture using native Windows API (no external dependencies)
= [
"dep:windows",
"windows/Win32_Graphics_Dxgi",
"windows/Win32_Graphics_Dxgi_Common",
"windows/Win32_Graphics_Direct3D",
"windows/Win32_Graphics_Direct3D11",
"windows/Win32_Foundation",
"windows/Win32_Graphics_Gdi", # Required for DXGI_OUTPUT_DESC and related types
]
# DLL injection module - Inject/unload DLLs into remote processes
# Supports x64 injector → x86/x64 target processes (WOW64 compatible)
# Use case: Game modding, process instrumentation, debugging
# Depends on snapshot module for module enumeration
= [
"snapshot", # Reuse snapshot for module enumeration
"dep:windows",
"windows/Win32_Foundation",
"windows/Win32_System_LibraryLoader", # GetModuleHandle, GetProcAddress
"windows/Win32_System_Memory", # VirtualAllocEx, WriteProcessMemory
"windows/Win32_System_Threading", # CreateRemoteThread, OpenProcess
"windows/Win32_System_Diagnostics_Debug", # WriteProcessMemory
"windows/Win32_Security", # Required for PROCESS_ACCESS_RIGHTS
]
# Image template matching with parallel processing support
# Heavy dependencies: image (~0.25), imageproc (~0.25), rayon
# Compilation time impact: +30-45s
# Use case: UI automation, game bot, visual element detection
= [
"dxgi",
# image: format support + parallel processing
"dep:image",
"image?/png",
"image?/jpeg",
"image?/rayon", # ← Enable rayon for image's parallel operations
# imageproc: parallel template matching algorithms
"dep:imageproc",
"imageproc?/rayon", # ← Enable rayon for imageproc's match_template_parallel
]
# Memory address resolution (symbolic addresses like "game.exe+0x123->456")
# Includes both static address parsing and AOB pattern scanning
= ["memory", "snapshot", "memory_aobscan"]
# Memory AOB (Array of Bytes) scanning with SIMD acceleration
= [
"memory",
"snapshot",
"dep:memchr",
"dep:rayon",
"windows/Win32_System_Memory", # For VirtualQueryEx, MEMORY_BASIC_INFORMATION
]
# Memory locking - Continuous monitoring and value restoration
# Independent from memory_hook, provides freeze/lock functionality
= [
"memory",
"memory_resolver", # For dynamic address resolution support
"dep:windows",
"windows/Win32_Foundation",
"windows/Win32_System_Threading", # For thread operations in background monitoring
]
# Memory hooking and manipulation (inline hooks, trampolines, bytes switching)
= [
"memory",
"dep:windows",
"windows/Win32_Foundation",
"windows/Win32_System_Memory", # VirtualAllocEx, VirtualProtectEx, VirtualFreeEx
"windows/Win32_System_Threading", # For thread operations
]
# Memory Manager - Unified interface for memory modifications (Locks, Hooks, etc.)
= ["memory_lock", "memory_hook", "memory_resolver", "utils_architecture"]
# Register extractor - Automatic CPU register capture at hook points
# Provides high-level API for extracting register values without complex pointer chains
= ["memory_hook"]
# === Utility Modules (Pure Rust, No External Dependencies) ===
# Lightweight utility functions with fine-grained feature control
# Utils sub-module features (fine-grained control)
= [] # Key code conversion utilities
= [] # Character/string conversion utilities
= [] # Thread utility functions (sleep, etc.)
= ["dep:windows", "memory_hook", "windows/Win32_Foundation", "windows/Win32_System_Threading"] # Process architecture detection
# Combined feature for backward compatibility (enables all utils)
= ["utils_key_code", "utils_chars", "utils_thread", "utils_architecture"]
# Script engine - Pure Rust implementation (zero dependencies, cross-platform)
# This is the core framework only, with no built-in instructions.
# Can be used for any instruction-based execution system on any platform.
= []
# Process context for script engine - Direct field access to Windows handles
# Provides ~50x faster access to HWND/HDC/HANDLE compared to HashMap lookups
# Only enable this if your scripts need Windows resource handles
= [
"dep:windows",
"windows/Win32_Foundation",
"windows/Win32_Graphics_Gdi",
]
# === Scripts Builtin Library (Optional Instruction Sets) ===
# Each category is independently feature-gated for maximum flexibility.
# Control flow instructions (loop, end, if, else, jump)
# Useful for any script engine usage, not just Windows automation
= ["script_engine", "scripts_terminator"]
# Keyboard input instructions (key, key_down, key_up)
= ["script_engine", "keyboard"]
# Mouse input instructions (click, move, dbclick, etc.)
= ["script_engine", "mouse"]
# Clipboard instructions (copy, paste)
= ["script_engine", "clipboard", "keyboard"]
# Timing instructions (sleep)
= ["script_engine", "scripts_terminator", "utils_thread"]
# Terminator instructions (end)
= []
# Window activation instruction (active)
# Requires process_context for HWND support
= ["script_engine", "script_process_context", "window"]
# Convenience features for keyboard with PostMessage support (deprecated)
# Note: scripts_mouse_with_post is removed as PostMessage mode is no longer supported
= ["scripts_keyboard", "script_process_context"]
# All built-in instructions (convenience feature)
# Automatically enables all instruction categories
= [
"scripts_control_flow",
"scripts_keyboard",
"scripts_mouse",
"scripts_clipboard",
"scripts_timing",
"scripts_terminator",
"scripts_window",
]
# === Pre-defined Feature Configurations ===
# Standard feature set - All stable features except heavy dependencies (template_matcher)
# Only depends on windows crate, minimal dependency footprint (~15s compilation)
# For full functionality including template matching: cargo build --no-default-features --features "full"
= [
# Core Windows API modules
"process",
"hwnd",
"window",
"snapshot",
"handle",
"hdc",
# Input modules
"keyboard",
"mouse",
"clipboard",
# Graphics and color modules
"dxgi",
"color_picker",
"color_finder",
# Memory operations
"memory",
"memory_resolver",
"memory_aobscan",
"memory_lock",
"memory_hook",
"memory_manager",
"memory_register_extractor",
# DLL injection module
"dll_injector",
# Script engine core
"script_engine",
"script_process_context",
# All built-in instruction sets
"scripts_builtin",
# Convenience feature for keyboard PostMessage support (deprecated)
"scripts_keyboard_with_post",
# Utility modules
"utils",
]
# Full production mode - ALL features including heavy dependencies (~45-60s compilation)
= [
"standard",
"template_matcher", # ← Heavy dependencies: image/imageproc/rayon (+30-45s)
]
[[]]
= "dll_injection"
= "examples/dll_injection.rs"
= ["dll_injector", "snapshot"]
[[]]
= "dxgi_capture"
= "examples/dxgi_capture.rs"
= ["dxgi"]
[[]]
= "dxgi_performance_comparison"
= "examples/dxgi_performance_comparison.rs"
= ["dxgi"]
[[]]
= "memory_manager_example"
= "examples/memory_manager_example.rs"
= ["memory_manager"]
[[]]
= "process_manager_example"
= "examples/process_manager_example.rs"
= ["process"]
[[]]
= "script_engine"
= "examples/script_engine.rs"
= ["script_engine", "scripts_builtin"]
[[]]
= "clipboard_usage"
= "examples/clipboard_usage.rs"
= ["clipboard"]
[[]]
= "color_conversion"
= "examples/color_conversion.rs"
= ["color_picker"]
[[]]
= "color_reexports"
= "examples/color_reexports.rs"
= ["color_finder"]
[[]]
= "active_instruction"
= "examples/active_instruction.rs"
= ["scripts_window", "script_process_context"]
[[]]
= "custom_init_flags"
= "examples/custom_init_flags.rs"
= ["process"]
[[]]
= "aobscan_64bit_bytecode"
= "examples/aobscan_64bit_bytecode.rs"
= ["memory_aobscan"]
[[]]
= "keyboard_usage"
= "examples/keyboard_usage.rs"
= ["keyboard", "script_engine", "scripts_builtin"]
[[]]
= "mouse_usage"
= "examples/mouse_usage.rs"
= ["mouse", "script_engine", "scripts_builtin"]