-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
78 lines (70 loc) · 3.32 KB
/
Copy pathCargo.toml
File metadata and controls
78 lines (70 loc) · 3.32 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
[package]
name = "phnt-rs"
version = "0.1.0"
edition = "2021"
authors = ["Magnet Forensics"]
license = "MIT"
description = "Automatically-generated Rust bindings for the Windows NT Native API (phnt project)"
repository = "https://github.com/magnetforensics/phnt-rs"
homepage = "https://github.com/magnetforensics/phnt-rs"
readme = "README.md"
keywords = ["windows", "nt", "native-api", "ffi", "bindings"]
categories = ["api-bindings", "os::windows-apis", "external-ffi-bindings"]
[dependencies]
# Use windows-sys for common Windows types to avoid duplication
# Features needed:
# - Win32_Foundation: NTSTATUS, BOOL, BOOLEAN, HANDLE, LUID
# - Win32_Security: LUID related types
windows-sys = { version = "0.61.2", features = ["Win32_Foundation"] }
# Use nt-string for proper UNICODE_STRING handling (needs alloc feature for NtUnicodeString)
nt-string = "0.1.1"
[dev-dependencies]
# Additional windows-sys features needed for tests
windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_System_Threading"] }
[build-dependencies]
# bindgen is only needed when regenerating bindings (requires LLVM/clang)
bindgen = { version = "0.70", optional = true }
[features]
# Default: use pre-generated bindings with all definitions (PHNT_WINDOWS_NEW)
default = []
# Regenerate bindings from phnt headers (requires LLVM/clang installed)
# By default, pre-generated bindings are used so consumers don't need LLVM
regenerate = ["dep:bindgen"]
# PHNT_VERSION feature flags - control which Windows version's definitions are included
# during binding generation. Only one should be enabled at a time.
# When regenerating, these determine the PHNT_VERSION define passed to the preprocessor.
# Pre-generated bindings use PHNT_WINDOWS_NEW (all definitions).
phnt-windows-xp = [] # PHNT_VERSION=51
phnt-windows-server-2003 = [] # PHNT_VERSION=52
phnt-windows-vista = [] # PHNT_VERSION=60
phnt-windows-7 = [] # PHNT_VERSION=61
phnt-windows-8 = [] # PHNT_VERSION=62
phnt-windows-8-1 = [] # PHNT_VERSION=63
phnt-windows-10 = [] # PHNT_VERSION=100
phnt-windows-10-th2 = [] # PHNT_VERSION=101
phnt-windows-10-rs1 = [] # PHNT_VERSION=102
phnt-windows-10-rs2 = [] # PHNT_VERSION=103
phnt-windows-10-rs3 = [] # PHNT_VERSION=104
phnt-windows-10-rs4 = [] # PHNT_VERSION=105
phnt-windows-10-rs5 = [] # PHNT_VERSION=106
phnt-windows-10-19h1 = [] # PHNT_VERSION=107
phnt-windows-10-19h2 = [] # PHNT_VERSION=108
phnt-windows-10-20h1 = [] # PHNT_VERSION=109
phnt-windows-10-20h2 = [] # PHNT_VERSION=110
phnt-windows-10-21h1 = [] # PHNT_VERSION=111
phnt-windows-10-21h2 = [] # PHNT_VERSION=112
phnt-windows-10-22h2 = [] # PHNT_VERSION=113
phnt-windows-11 = [] # PHNT_VERSION=114
phnt-windows-11-22h2 = [] # PHNT_VERSION=115
phnt-windows-11-23h2 = [] # PHNT_VERSION=116
phnt-windows-11-24h2 = [] # PHNT_VERSION=117
phnt-windows-new = [] # PHNT_VERSION=ULONG_MAX (all definitions)
[package.metadata.docs.rs]
# Build documentation on docs.rs with these settings
default-target = "x86_64-pc-windows-msvc"
targets = ["x86_64-pc-windows-msvc"]
# Enable doc_cfg feature for conditional documentation
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]
# Build with all definitions (pre-generated bindings use PHNT_WINDOWS_NEW)
features = []