Skip to main content

fe11_sys/
lib.rs

1//! Raw OASIS PKCS#11 3.2 declarations. See the crate README and NOTICE.txt.
2//!
3//! This layer supplies C layouts and nullable unsafe function pointers. The caller
4//! owns module lifetime, version negotiation, buffer validity and synchronization.
5//! A declared mechanism or function is not a capability or security-policy claim.
6#![no_std]
7#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
8#![doc = include_str!("../HEADER-NOTES.md")]
9
10#[cfg(all(
11    target_os = "linux",
12    target_vendor = "unknown",
13    target_env = "gnu",
14    target_arch = "x86_64",
15    target_pointer_width = "64",
16    target_endian = "little"
17))]
18#[path = "x86_64-unknown-linux-gnu/mod.rs"]
19mod platform;
20
21#[cfg(all(
22    target_os = "windows",
23    target_vendor = "pc",
24    target_env = "msvc",
25    target_arch = "x86_64",
26    target_pointer_width = "64",
27    target_endian = "little"
28))]
29#[path = "x86_64-pc-windows-msvc/mod.rs"]
30mod platform;
31
32#[cfg(any(
33    all(
34        target_os = "linux",
35        target_vendor = "unknown",
36        target_env = "gnu",
37        target_arch = "x86_64",
38        target_pointer_width = "64",
39        target_endian = "little"
40    ),
41    all(
42        target_os = "windows",
43        target_vendor = "pc",
44        target_env = "msvc",
45        target_arch = "x86_64",
46        target_pointer_width = "64",
47        target_endian = "little"
48    )
49))]
50pub use platform::*;
51
52#[cfg(not(any(
53    all(
54        target_os = "linux",
55        target_vendor = "unknown",
56        target_env = "gnu",
57        target_arch = "x86_64",
58        target_pointer_width = "64",
59        target_endian = "little"
60    ),
61    all(
62        target_os = "windows",
63        target_vendor = "pc",
64        target_env = "msvc",
65        target_arch = "x86_64",
66        target_pointer_width = "64",
67        target_endian = "little"
68    )
69)))]
70compile_error!("Fe11-sys supports only x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.");