Raw Rust FFI bindings to the util-linux/libmount
C library.
This crate requires libmount
version 2.39.2
or later.
Install the following packages beforehand to build this crate:
util-linux
: to generate Rust bindings fromlibmount
's header files.libclang
: to satisfy the dependency ofbindgen
onlibclang
.pkg-config
: to detect system libraries.
This in addition to the Rust toolchain.
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
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
Copyright (c) 2023 Nick Piaddo
SPDX-License-Identifier: Apache-2.0 OR MIT