5 releases (3 breaking)
| 0.4.0 | Jul 4, 2024 |
|---|---|
| 0.3.4 | Jul 23, 2023 |
| 0.2.1 | Jul 17, 2023 |
| 0.1.1 | Jun 2, 2023 |
#170 in Unix APIs
Used in 2 crates
(via linux-syscalls)
175KB
3K
SLoC
linux-errnos
Cross-arch enumeration of Linux error numbers that may vary across archs.
If target_arch is supported a module's top-level Errno and ErrnoIter (if
iter feature flag is present) are re-exported.
Feature flags
std: enable std support (dealing with std::io::Error).iter: enableErrno::iter()function.libc-compat: enablelibccompatibility (global errno).no_std_io-compat: enableno_std_iocrate compatibility.all: enable all the architectures.
Other flags
There is a feature flag for each of the "linux/arch/*" directories indicating the architecture family name. For example there is a linux/arch/x86 that contains x86/x86_64/x32 implementations and that shares the same errnos.
alphaarcarmarm64cskyhexagonia64loongarchm68kmicroblazemipsnios2openriscpariscpowerpcriscvs390shsparcumx86xtensa
There is a feature flag for each of the supported target_arch too:
x86x86_64armaarch64hexagons390xpowerpcpowerpc64mipsmips64m68kriscv32riscv64sparcsparc64loongarch64
#![no_std]
Enable #![no_std] support by disabling the default std feature:
[dependencies]
linux-errnos = { version = "*", default-features = false }
Code generation
All the code is generated by the an inner crate in the errno-gen directory
except for the src/macros.rs file, so don't touch auto generated files please.
MSRV
1.38.0
Dependencies
~70KB