#linux #stats #syscalls #fs #no-std

no-std linux-stat

一个纯Rust库,仅使用系统调用在Linux上实现stat函数

6个版本

0.3.3 2023年7月23日
0.3.2 2023年7月13日
0.3.0 2023年6月27日
0.2.0 2023年6月27日
0.1.0 2023年6月26日

#680 in Unix APIs

每月41次下载

MIT许可证

135KB
3.5K SLoC

linux-stat

GitHub Workflow Status (with branch) Crates.io docs.rs Crates.io

一个纯Rust库,仅使用系统调用在Linux上实现stat函数。

tl;dr

它尝试使用statx系统调用,并回退到fstatat

功能标志

  • std: 启用std支持。
  • linux_4_11: 假设内核至少为4.11.0,因此使用statx

#![no_std]

通过禁用默认的std功能,启用#![no_std]支持

[dependencies]
linux-stat = { version = "*", default-features = false }

平台

  • aarch64
  • arm
  • mips
  • mips64
  • mips64el
  • mipsel
  • powerpc
  • powerpc64
  • powerpc64el
  • riscv64
  • s390x
  • x86
  • x86_64
  • loongarch64

MSRV

1.46.0

依赖项

~1.6–3.5MB
~73K SLoC