Uses new Rust 2021
|0.2.4||Nov 23, 2022|
|0.2.3||Nov 20, 2022|
|0.2.2||Sep 3, 2022|
|0.2.1||Oct 25, 2021|
|0.1.0||Oct 13, 2021|
#218 in Hardware support
89 downloads per month
Used in lm-sensors
sensors-sys: Unsafe Rust bindings for
lm-sensors provides user-space support for the hardware monitoring drivers
This crate is Linux-specific. Building it for non-Linux platforms, or for the Linux kernel, results in an empty crate.
Supported environment variables
This crate depends on some environment variables, and variants of those.
For each environment variable (e.g.,
CC), the following are the accepted
variants of it:
The following environment variables (and their variants) affect how this crate is built:
Dynamic or static linking
This crate links to
libsensors dynamically if possible, except when targeting
platforms based on the
musl C library.
This behavior can be changed either by setting the environment variable
1, or by enabling the crate feature
If both are defined, then the value of
LMSENSORS_STATIC takes precedence.
0 mandates dynamic linking.
Finding SELinux library and headers
By default, this crate finds SELinux headers and library based on the default target C compiler.
This behavior can be changed by:
- Either defining the environment variable
LMSENSORS_PATHto the path of a directory containing the sub-directories
libwhere the headers and library are installed.
- Or by defining one or both of the environment variables
LMSENSORS_LIB_DIRto paths to the directories where headers and library are present. If
LMSENSORS_PATHis also defined, then
Depending on this crate
This crate provides the following variables to other crates that depend on it:
DEP_LMSENSORS_INCLUDE: Path of the directory where library C header files reside.
DEP_LMSENSORS_LIB: Path of the directory where the library binary resides.
Documentation-only build mode
The documentation-only build mode allows building documentation even if
libsensors and its headers are unavailable.
To build in this mode, set the environment variable
$ env DOCS_RS=1 cargo doc --open
The generated documentation is based on
⚠️ The generated crate might be unusable in this mode.
This project adheres to Semantic Versioning.
CHANGELOG.md file details notable changes over time.