22 <h1 ><code >rustix</code ></h1 >
33
44 <p >
5- <strong>Safe Rust bindings to POSIX/Unix/Linux/Winsock2 syscalls</strong>
5+ <strong>Safe Rust bindings to POSIX/Unix/Linux/Winsock syscalls</strong>
66 </p >
77
88 <strong >A <a href =" https://bytecodealliance.org/ " >Bytecode Alliance</a > project</strong >
1616</div >
1717
1818` rustix ` provides efficient memory-safe and [ I/O-safe] wrappers to POSIX-like,
19- Unix-like, Linux, and Winsock2 syscall-like APIs, with configurable backends.
19+ Unix-like, Linux, and Winsock syscall-like APIs, with configurable backends.
2020It uses Rust references, slices, and return values instead of raw pointers, and
2121[ I/O safety types] instead of raw file descriptors, providing memory safety,
2222[ I/O safety] , and [ provenance] . It uses ` Result ` s for reporting errors,
2323[ ` bitflags ` ] instead of bare integer flags, an [ ` Arg ` ] trait with optimizations
2424to efficiently accept any Rust string type, and several other efficient
2525conveniences.
2626
27- ` rustix ` is low-level and, and while the ` net ` API supports Winsock2 on
28- Windows , the rest of the APIs do not support Windows; for higher-level and more
29- portable APIs built on this functionality, see the [ ` cap-std ` ] , [ ` memfd ` ] ,
27+ ` rustix ` is low-level and, and while the ` net ` API supports [ Windows Sockets 2 ]
28+ (Winsock) , the rest of the APIs do not support Windows; for higher-level and
29+ more portable APIs built on this functionality, see the [ ` cap-std ` ] , [ ` memfd ` ] ,
3030[ ` timerfd ` ] , and [ ` io-streams ` ] crates, for example.
3131
3232` rustix ` currently has two backends available:
@@ -42,7 +42,7 @@ portable APIs built on this functionality, see the [`cap-std`], [`memfd`],
4242 provenance all the way down to the syscalls.
4343
4444 * libc, which uses the [ ` libc ` ] crate which provides bindings to native ` libc `
45- libraries on Unix-family platforms, and [ ` windows-sys ` ] for Winsock2 on
45+ libraries on Unix-family platforms, and [ ` windows-sys ` ] for Winsock on
4646 Windows, and is portable to many OS's.
4747
4848The linux_raw backend is enabled by default on platforms which support it. To
@@ -165,6 +165,7 @@ always reflect “very old” Linux versions.
165165[ any current Rust target ] : https://doc.rust-lang.org/nightly/rustc/platform-support.html
166166[ kernel.org ] : https://www.kernel.org/releases.html
167167[ Rust on Debian stable ] : https://packages.debian.org/stable/rust/rustc
168+ [ Windows Sockets 2 ] : https://learn.microsoft.com/en-us/windows/win32/winsock/windows-sockets-start-page-2
168169[ `nix` ] : https://crates.io/crates/nix
169170[ `unix` ] : https://crates.io/crates/unix
170171[ `nc` ] : https://crates.io/crates/nc
0 commit comments