2
2
<h1 ><code >rustix</code ></h1 >
3
3
4
4
<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>
6
6
</p >
7
7
8
8
<strong >A <a href =" https://bytecodealliance.org/ " >Bytecode Alliance</a > project</strong >
16
16
</div >
17
17
18
18
` 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.
20
20
It uses Rust references, slices, and return values instead of raw pointers, and
21
21
[ I/O safety types] instead of raw file descriptors, providing memory safety,
22
22
[ I/O safety] , and [ provenance] . It uses ` Result ` s for reporting errors,
23
23
[ ` bitflags ` ] instead of bare integer flags, an [ ` Arg ` ] trait with optimizations
24
24
to efficiently accept any Rust string type, and several other efficient
25
25
conveniences.
26
26
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 ` ] ,
30
30
[ ` timerfd ` ] , and [ ` io-streams ` ] crates, for example.
31
31
32
32
` rustix ` currently has two backends available:
@@ -42,7 +42,7 @@ portable APIs built on this functionality, see the [`cap-std`], [`memfd`],
42
42
provenance all the way down to the syscalls.
43
43
44
44
* 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
46
46
Windows, and is portable to many OS's.
47
47
48
48
The linux_raw backend is enabled by default on platforms which support it. To
@@ -165,6 +165,7 @@ always reflect “very old” Linux versions.
165
165
[ any current Rust target ] : https://doc.rust-lang.org/nightly/rustc/platform-support.html
166
166
[ kernel.org ] : https://www.kernel.org/releases.html
167
167
[ 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
168
169
[ `nix` ] : https://crates.io/crates/nix
169
170
[ `unix` ] : https://crates.io/crates/unix
170
171
[ `nc` ] : https://crates.io/crates/nc
0 commit comments