{"id":15401190,"url":"https://github.com/sunfishcode/rustix-testing","last_synced_at":"2025-04-16T02:32:32.464Z","repository":{"id":43829455,"uuid":"381559394","full_name":"sunfishcode/rustix-testing","owner":"sunfishcode","description":"Extra testing for rustix","archived":false,"fork":false,"pushed_at":"2023-10-12T11:06:12.000Z","size":3878,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-25T00:39:29.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunfishcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-30T03:04:46.000Z","updated_at":"2023-01-18T15:35:13.000Z","dependencies_parsed_at":"2024-10-19T07:26:41.131Z","dependency_job_id":"ea1d1733-6c55-4878-a1a4-bca1aa20701a","html_url":"https://github.com/sunfishcode/rustix-testing","commit_stats":{"total_commits":1593,"total_committers":53,"mean_commits":"30.056603773584907","dds":0.09353421217827995,"last_synced_commit":"be98e0c7e452c224ef6b4da29f8c30d17e87aa64"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Frustix-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Frustix-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Frustix-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunfishcode%2Frustix-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunfishcode","download_url":"https://codeload.github.com/sunfishcode/rustix-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223693208,"owners_count":17187147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T15:56:47.588Z","updated_at":"2024-11-08T13:39:45.091Z","avatar_url":"https://github.com/sunfishcode.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003erustix\u003c/code\u003e\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eSafe Rust bindings to POSIX/Unix/Linux/Winsock2 syscalls\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cstrong\u003eA \u003ca href=\"https://bytecodealliance.org/\"\u003eBytecode Alliance\u003c/a\u003e project\u003c/strong\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/bytecodealliance/rustix/actions?query=workflow%3ACI\"\u003e\u003cimg src=\"https://github.com/bytecodealliance/rustix/workflows/CI/badge.svg\" alt=\"Github Actions CI Status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general\"\u003e\u003cimg src=\"https://img.shields.io/badge/zulip-join_chat-brightgreen.svg\" alt=\"zulip chat\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/rustix\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/rustix.svg\" alt=\"crates.io page\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/rustix\"\u003e\u003cimg src=\"https://docs.rs/rustix/badge.svg\" alt=\"docs.rs docs\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n`rustix` provides efficient memory-safe and [I/O-safe] wrappers to POSIX-like,\nUnix-like, Linux, and Winsock2 syscall-like APIs, with configurable backends.\nIt uses Rust references, slices, and return values instead of raw pointers, and\n[I/O safety types] instead of raw file descriptors, providing memory safety,\n[I/O safety], and [provenance]. It uses `Result`s for reporting errors,\n[`bitflags`] instead of bare integer flags, an [`Arg`] trait with optimizations\nto efficiently accept any Rust string type, and several other efficient\nconveniences.\n\n`rustix` is low-level and, and while the `net` API supports Winsock2 on\nWindows, the rest of the APIs do not support Windows; for higher-level and more\nportable APIs built on this functionality, see the [`cap-std`], [`memfd`],\n[`timerfd`], and [`io-streams`] crates, for example.\n\n`rustix` currently has two backends available:\n\n * linux_raw, which uses raw Linux system calls and vDSO calls, and is\n   supported on Linux on x86-64, x86, aarch64, riscv64gc, powerpc64le,\n   arm (v5 onwards), mipsel, and mips64el, with stable, nightly, and 1.63 Rust.\n    - By being implemented entirely in Rust, avoiding `libc`, `errno`, and pthread\n      cancellation, and employing some specialized optimizations, most functions\n      compile down to very efficient code, which can often be fully inlined into\n      user code.\n    - Most functions in `linux_raw` preserve memory, I/O safety, and pointer\n      provenance all the way down to the syscalls.\n\n * libc, which uses the [`libc`] crate which provides bindings to native `libc`\n   libraries on Unix-family platforms, and [`windows-sys`] for Winsock2 on\n   Windows, and is portable to many OS's.\n\nThe linux_raw backend is enabled by default on platforms which support it. To\nenable the libc backend instead, either enable the \"use-libc\" cargo feature,\nor set the `RUSTFLAGS` environment variable to `--cfg=rustix_use_libc` when\nbuilding.\n\n## Cargo features\n\nThe modules [`rustix::io`], [`rustix::fd`], and [`rustix::ffi`] are enabled\nby default. The rest of the API is conditional with cargo feature flags:\n\n| Name       | Description\n| ---------- | ---------------------\n| `event`    | [`rustix::event`]—Polling and event operations.\n| `fs`       | [`rustix::fs`] and [`rustix::path`]—Filesystem operations.\n| `io_uring` | [`rustix::io_uring`]—Linux io_uring.\n| `mm`       | [`rustix::mm`]—Memory map operations.\n| `net`      | [`rustix::net`] and [`rustix::path`]—Network-related operations.\n| `param`    | [`rustix::param`]—Process parameters.\n| `pipe`     | [`rustix::pipe`]—Pipe operations.\n| `process`  | [`rustix::process`]—Process-associated operations.\n| `procfs`   | [`rustix::procfs`]—Utilities for reading `/proc` on Linux.\n| `pty`      | [`rustix::pty`]—Pseudoterminal operations.\n| `rand`     | [`rustix::rand`]—Random-related operations.\n| `stdio`    | [`rustix::stdio`]—Stdio-related operations.\n| `system`   | [`rustix::system`]—System-related operations.\n| `termios`  | [`rustix::termios`]—Terminal I/O stream operations.\n| `thread`   | [`rustix::thread`]—Thread-associated operations.\n| `time`     | [`rustix::time`]—Time-related operations.\n|            |\n| `use-libc` | Enable the libc backend.\n\n[`rustix::event`]: https://docs.rs/rustix/*/rustix/fs/index.html\n[`rustix::fs`]: https://docs.rs/rustix/*/rustix/fs/index.html\n[`rustix::io_uring`]: https://docs.rs/rustix/*/rustix/io_uring/index.html\n[`rustix::mm`]: https://docs.rs/rustix/*/rustix/mm/index.html\n[`rustix::net`]: https://docs.rs/rustix/*/rustix/net/index.html\n[`rustix::param`]: https://docs.rs/rustix/*/rustix/param/index.html\n[`rustix::pipe`]: https://docs.rs/rustix/*/rustix/pipe/index.html\n[`rustix::process`]: https://docs.rs/rustix/*/rustix/process/index.html\n[`rustix::procfs`]: https://docs.rs/rustix/*/rustix/procfs/index.html\n[`rustix::pty`]: https://docs.rs/rustix/*/rustix/pty/index.html\n[`rustix::rand`]: https://docs.rs/rustix/*/rustix/rand/index.html\n[`rustix::stdio`]: https://docs.rs/rustix/*/rustix/stdio/index.html\n[`rustix::system`]: https://docs.rs/rustix/*/rustix/system/index.html\n[`rustix::termios`]: https://docs.rs/rustix/*/rustix/termios/index.html\n[`rustix::thread`]: https://docs.rs/rustix/*/rustix/thread/index.html\n[`rustix::time`]: https://docs.rs/rustix/*/rustix/time/index.html\n[`rustix::io`]: https://docs.rs/rustix/*/rustix/io/index.html\n[`rustix::fd`]: https://docs.rs/rustix/*/rustix/fd/index.html\n[`rustix::ffi`]: https://docs.rs/rustix/*/rustix/ffi/index.html\n[`rustix::path`]: https://docs.rs/rustix/*/rustix/path/index.html\n\n## 64-bit Large File Support (LFS) and Year 2038 (y2038) support\n\n`rustix` automatically uses 64-bit APIs when available, and avoids exposing\n32-bit APIs that would have the year-2038 problem or fail to support large\nfiles. For instance, `rustix::fstatvfs` calls `fstatvfs64`, and returns a\nstruct that's 64-bit even on 32-bit platforms.\n\n## Similar crates\n\n`rustix` is similar to [`nix`], [`simple_libc`], [`unix`], [`nc`], and\n[`uapi`]. `rustix` is architected for [I/O safety] with most APIs using\n[`OwnedFd`] and [`AsFd`] to manipulate file descriptors rather than `File` or\neven `c_int`, and supporting multiple backends so that it can use direct\nsyscalls while still being usable on all platforms `libc` supports. Like `nix`,\n`rustix` has an optimized and flexible filename argument mechanism that allows\nusers to use a variety of string types, including non-UTF-8 string types.\n\n[`relibc`] is a similar project which aims to be a full \"libc\", including\nC-compatible interfaces and higher-level C/POSIX standard-library\nfunctionality; `rustix` just aims to provide safe and idiomatic Rust interfaces\nto low-level syscalls. `relibc` also doesn't tend to support features not\nsupported on Redox, such as `*at` functions like `openat`, which are important\nfeatures for `rustix`.\n\n`rustix` has its own code for making direct syscalls, similar to the\n[`syscall`], [`sc`], and [`scall`] crates, though `rustix` can use either the\nRust `asm!` macro or out-of-line `.s` files so it supports Rust versions from\n1.63 through Nightly and architectures where Rust's inline asm is not yet\nstable. `rustix` can also use Linux's vDSO mechanism to optimize Linux\n`clock_gettime` on all architectures, and all Linux system calls on x86. And\n`rustix`'s syscalls report errors using an optimized `Errno` type.\n\n`rustix`'s `*at` functions are similar to the [`openat`] crate, but `rustix`\nprovides them as free functions rather than associated functions of a `Dir`\ntype. `rustix`'s `CWD` constant exposes the special `AT_FDCWD` value in a safe\nway, so users don't need to open `.` to get a current-directory handle.\n\n`rustix`'s `openat2` function is similar to the [`openat2`] crate, but uses I/O\nsafety types rather than `RawFd`. `rustix` does not provide dynamic feature\ndetection, so users must handle the [`NOSYS`] error themselves.\n\n`rustix`'s `termios` module is similar to the [`termios`] crate, but uses I/O\nsafety types rather than `RawFd`, and the flags parameters to functions such as\n`tcsetattr` are `enum`s rather than bare integers. And, rustix calls its\n`tcgetattr` function `tcgetattr`, rather than `Termios::from_fd`.\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate currently works on the version of [Rust on Debian stable], which is\ncurrently Rust 1.63. This policy may change in the future, in minor version\nreleases, so users using a fixed version of Rust should pin to a specific\nversion of this crate.\n\n[Rust on Debian stable]: https://packages.debian.org/stable/rust/rustc\n[`nix`]: https://crates.io/crates/nix\n[`unix`]: https://crates.io/crates/unix\n[`nc`]: https://crates.io/crates/nc\n[`simple_libc`]: https://crates.io/crates/simple_libc\n[`uapi`]: https://crates.io/crates/uapi\n[`relibc`]: https://github.com/redox-os/relibc\n[`syscall`]: https://crates.io/crates/syscall\n[`sc`]: https://crates.io/crates/sc\n[`scall`]: https://crates.io/crates/scall\n[`openat`]: https://crates.io/crates/openat\n[`openat2`]: https://crates.io/crates/openat2\n[I/O safety types]: https://doc.rust-lang.org/stable/std/os/fd/index.html#structs\n[`termios`]: https://crates.io/crates/termios\n[`libc`]: https://crates.io/crates/libc\n[`windows-sys`]: https://crates.io/crates/windows-sys\n[`cap-std`]: https://crates.io/crates/cap-std\n[`memfd`]: https://crates.io/crates/memfd\n[`timerfd`]: https://crates.io/crates/timerfd\n[`io-streams`]: https://crates.io/crates/io-streams\n[`bitflags`]: https://crates.io/crates/bitflags\n[`Arg`]: https://docs.rs/rustix/*/rustix/path/trait.Arg.html\n[I/O-safe]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md\n[I/O safety]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md\n[provenance]: https://github.com/rust-lang/rust/issues/95228\n[`OwnedFd`]: https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html\n[`AsFd`]: https://doc.rust-lang.org/stable/std/os/fd/trait.AsFd.html\n[`NOSYS`]: https://docs.rs/rustix/*/rustix/io/struct.Errno.html#associatedconstant.NOSYS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Frustix-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunfishcode%2Frustix-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunfishcode%2Frustix-testing/lists"}