Sunbeam Studios

Our open-source projects, here for you!

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 = true
cargo add windows-targets@0.52.6

About 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
Cargo
2026-03-26 11:06:35 +00:00
0
Microsoft
MIT OR Apache-2.0
6.8 KiB
Assets (1)
Versions (3) View all
0.52.6 2026-03-26
0.48.5 2026-03-26
0.53.5 2026-03-26