2 stable releases

1.0.1 Sep 8, 2022
1.0.0 Sep 6, 2022

#554 in Unix APIs

Download history 74/week @ 2023-12-14 46/week @ 2023-12-21 320/week @ 2023-12-28 192/week @ 2024-01-04 173/week @ 2024-01-11 204/week @ 2024-01-18 164/week @ 2024-01-25 160/week @ 2024-02-01 205/week @ 2024-02-08 195/week @ 2024-02-15 232/week @ 2024-02-22 242/week @ 2024-02-29 292/week @ 2024-03-07 253/week @ 2024-03-14 198/week @ 2024-03-21 94/week @ 2024-03-28

855 downloads per month
Used in linux-syscall

0BSD license

53KB
1K SLoC

Linux error numbers for Rust

This library defines an Error struct that represents error numbers returned from Linux system calls.

On Linux, error numbers are architecture-specific. The arch modules provide access to error numbers for all supported architectures, and the top-level module re-exports error numbers for the current target platform.

To depend on linux-errno from a Bazel workspace:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rust_posix_errno",
    sha256 = "0c86c849ff673372fe6415d4004a233565b57b2884ea49d3b725dd1296cc2529",
    strip_prefix = "posix-errno-1.0.1",
    urls = ["https://github.com/jmillikin/rust-posix-errno/releases/download/v1.0.1/posix-errno-1.0.1.tar.xz"],
)

http_archive(
    name = "rust_linux_errno",
    # Obtain the package checksum from the release page:
    # https://github.com/jmillikin/rust-linux-errno/releases/tag/v1.0.1
    sha256 = "",
    strip_prefix = "linux-errno-1.0.1",
    urls = ["https://github.com/jmillikin/rust-linux-errno/releases/download/v1.0.1/linux-errno-1.0.1.tar.xz"],
)

To depend on linux-errno from a Cargo workspace:

[dependencies]
linux-errno = { version = "1.0.1" }

Dependencies