windows-targets (0.52.6)
Published 2026-03-26 11:06:35 +00:00 by siennathesane
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add windows-targets@0.52.6About this package
Import libs for Windows
Import libs for Windows
The windows-targets crate includes import libs, supports semantic versioning, and optional support for raw-dylib.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-targets]
version = "0.52"
Use the link macro to define the external functions you wish to call:
windows_targets::link!("kernel32.dll" "system" fn SetLastError(code: u32));
windows_targets::link!("kernel32.dll" "system" fn GetLastError() -> u32);
fn main() {
unsafe {
SetLastError(1234);
assert_eq!(GetLastError(), 1234);
}
}
Dependencies
| ID | Version |
|---|---|
| windows_aarch64_gnullvm | ^0.52.6 |
| windows_x86_64_msvc | ^0.52.6 |
| windows_aarch64_msvc | ^0.52.6 |
| windows_i686_gnu | ^0.52.6 |
| windows_i686_msvc | ^0.52.6 |
| windows_x86_64_gnu | ^0.52.6 |
| windows_i686_gnullvm | ^0.52.6 |
| windows_x86_64_gnullvm | ^0.52.6 |
Details
Assets (1)
Versions (3)
View all
windows-targets-0.52.6.crate
6.8 KiB