Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 1.98 KB

README.md

File metadata and controls

78 lines (51 loc) · 1.98 KB

rsmount-sys

Crates.io License Crates.io MSRV


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


Supported library version

This crate requires libmount version 2.39.2 or later.

Build dependencies

Install the following packages beforehand to build this crate:

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