Sha256: 0605ad98583e44549d5bd02291fb84ea628857f3700c81844beb16f00e10c47a

Contents?: true

Size: 1.64 KB

Versions: 8

Compression:

Stored size: 1.64 KB

Contents

/*!
Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
*/

#![no_std]

/// Defines an external function to import.
#[cfg(all(windows_raw_dylib, target_arch = "x86"))]
#[macro_export]
macro_rules! link {
    ($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
        #[link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated")]
        extern $abi {
            $(#[link_name=$link_name])?
            pub fn $($function)*;
        }
    )
}

/// Defines an external function to import.
#[cfg(all(windows_raw_dylib, not(target_arch = "x86")))]
#[macro_export]
macro_rules! link {
    ($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
        #[link(name = $library, kind = "raw-dylib", modifiers = "+verbatim")]
        extern "C" {
            $(#[link_name=$link_name])?
            pub fn $($function)*;
        }
    )
}

/// Defines an external function to import.
#[cfg(all(windows, not(windows_raw_dylib)))]
#[macro_export]
macro_rules! link {
    ($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
        #[link(name = "windows.0.52.0")]
        extern $abi {
            $(#[link_name=$link_name])?
            pub fn $($function)*;
        }
    )
}

/// Defines an external function to import.
#[cfg(all(not(windows), not(windows_raw_dylib)))]
#[macro_export]
macro_rules! link {
    ($library:literal $abi:literal $($link_name:literal)? $(#[$doc:meta])? fn $($function:tt)*) => (
        extern $abi {
            pub fn $($function)*;
        }
    )
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-28.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-27.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-26.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-25.0.2 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-25.0.1 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-25.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs
wasmtime-24.0.0 ./ext/cargo-vendor/windows-targets-0.52.6/src/lib.rs