Skip to content

nickpiaddo/rsblkid-sys

Repository files navigation

rsblkid-sys

Crates.io License Crates.io MSRV


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


Supported library version

This crate requires libblkid version 2.39.2 or later.

Build dependencies

Install the following packages beforehand to build this crate:

  • util-linux: to generate Rust bindings from libblkid'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

This repository contains a configuration file (flake.nix) that will automatically set up a development environment for you. If you have configured your system to use flakes, issue the following command from the directory containing the flake.nix file.

nix develop

The flake will take care of installing the Rust toolchain. Once package downloads and installations are complete, compile the crate with the command cargo build.

Alternately, you can manually install the required packages temporarily 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

Install the Rust toolchain via rustup or the package manager, then run cargo build:

apk add cargo

License

Copyright (c) 2023 Nick Piaddo

SPDX-License-Identifier: Apache-2.0 OR MIT

About

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

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages