Crates.io | linux-io |
lib.rs | linux-io |
version | 0.11.0 |
source | src |
created_at | 2023-02-05 19:09:39.075018 |
updated_at | 2024-07-31 02:17:59.816228 |
description | Lightweight abstractions around Linux system calls related to file descriptors. |
homepage | |
repository | https://github.com/apparentlymart/rust-linux |
max_upload_size | |
id | 777330 |
size | 140,909 |
linux-io
crate for RustThis crate offers some lightweight wrappers around direct Linux system calls related to file descriptors.
The goal is to make it convenient to work with the Linux system call interface
and bypass std
/libc without introducing any unnecessary additional
abstractions beyond slight transformations of argument types and return values.
let mut f = File::create_raw(filename, 0o666)?
f.write_all(message)?; // (using the std::io::Write trait)
f.close()?;
By default this crate implements traits from the standard library where they
make sense, but you can disable the default crate feature named std
to
remove those trait implementations and thereby make this crate usable in
no_std
environments.