#bindings #ffi #libfdisk

sys rsfdisk-sys

Raw FFI bindings to the util-linux/libfdisk C library

3 unstable releases

0.2.1 Oct 15, 2024
0.2.0 Oct 10, 2024
0.1.0 Sep 30, 2024

#857 in Operating systems

Download history 1/week @ 2024-11-16 1/week @ 2024-11-23 6/week @ 2024-11-30 13/week @ 2024-12-07 8/week @ 2025-01-18 44/week @ 2025-01-25 61/week @ 2025-02-01 45/week @ 2025-02-08 2/week @ 2025-02-15 5/week @ 2025-02-22 85/week @ 2025-03-01

144 downloads per month
Used in rsfdisk

Apache-2.0 OR MIT

12KB
87 lines

rsfdisk-sys

Crates.io License Crates.io MSRV


Raw Rust FFI bindings to the util-linux/libfdisk C library.


Supported library version

This crate requires libfdisk version 2.39.2 or later.

Build dependencies

Install the following packages beforehand to build this crate:

  • util-linux: to generate Rust bindings from libfdisk's header files.
  • libclang: to satisfy the dependency of bindgen on libclang.
  • pkg-config: to detect system libraries.

This in addition to the Rust toolchain.

NixOS

Temporarily install the required packages with:

nix-shell -p util-linux.dev libclang.lib pkg-config

or permanently with:

nix-env -iA nixos.util-linux.dev nixos.libclang.lib nixos.pkg-config

Alpine Linux

As root, issue the following command:

apk add util-linux-dev clang-libclang pkgconfig

Ubuntu

sudo apt-get install libfdisk-dev libclang-dev pkg-config

License

Copyright (c) 2023 Nick Piaddo

SPDX-License-Identifier: Apache-2.0 OR MIT

Dependencies

~0–2.2MB
~44K SLoC