2 个稳定版本

1.0.1 2022年9月8日
1.0.0 2022年9月6日

420Unix API 中排名

Download history 163/week @ 2024-04-09 116/week @ 2024-04-16 134/week @ 2024-04-23 94/week @ 2024-04-30 158/week @ 2024-05-07 131/week @ 2024-05-14 84/week @ 2024-05-21 86/week @ 2024-05-28 331/week @ 2024-06-04 275/week @ 2024-06-11 218/week @ 2024-06-18 149/week @ 2024-06-25 161/week @ 2024-07-02 266/week @ 2024-07-09 97/week @ 2024-07-16 114/week @ 2024-07-23

655 每月下载量
用于 linux-syscall

0BSD 许可

53KB
1K SLoC

Rust 的 Linux 错误码

此库定义了一个表示从 Linux 系统调用返回的错误码的 Error 结构体。

在 Linux 上,错误码是架构特定的。`arch` 模块提供了对所有支持的架构的错误码的访问,顶级模块重新导出当前目标平台的错误码。

从 Bazel 工作区依赖 linux-errno

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"],
)

从 Cargo 工作区依赖 linux-errno

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

依赖项