Sha256: 5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee

Contents?: true

Size: 902 Bytes

Versions: 8

Compression:

Stored size: 902 Bytes

Contents

//! Provides the `link!` macro used by the generated windows bindings.
//!
//! This is a simple wrapper around an `extern` block with a `#[link]` attribute.
//! It's very roughly equivalent to the windows-targets crate.

macro_rules! link_macro {
    ($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
        // Note: the windows-targets crate uses a pre-built Windows.lib import library which we don't
        // have in this repo. So instead we always link kernel32.lib and add the rest of the import
        // libraries below by using an empty extern block. This works because extern blocks are not
        // connected to the library given in the #[link] attribute.
        #[link(name = "kernel32")]
        extern $abi {
            $(#[link_name=$link_name])?
            pub fn $($function)*;
        }
    )
}
pub(crate) use link_macro as link;

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/cc-1.2.10/src/windows/windows_targets.rs
wasmtime-28.0.0 ./ext/cargo-vendor/cc-1.2.7/src/windows/windows_targets.rs
wasmtime-27.0.0 ./ext/cargo-vendor/cc-1.2.1/src/windows/windows_targets.rs
wasmtime-26.0.0 ./ext/cargo-vendor/cc-1.1.31/src/windows/windows_targets.rs
wasmtime-25.0.2 ./ext/cargo-vendor/cc-1.1.13/src/windows/windows_targets.rs
wasmtime-25.0.1 ./ext/cargo-vendor/cc-1.1.13/src/windows/windows_targets.rs
wasmtime-25.0.0 ./ext/cargo-vendor/cc-1.1.13/src/windows/windows_targets.rs
wasmtime-24.0.0 ./ext/cargo-vendor/cc-1.1.13/src/windows/windows_targets.rs