Crates.io | libiio-sys |
lib.rs | libiio-sys |
version | |
source | src |
created_at | 2018-11-22 01:42:37.882836 |
updated_at | 2024-12-10 15:43:16.45196 |
description | Native, unsafe, bindings to the Linux libiio library. Used by industrial-io. |
homepage | https://github.com/fpagliughi/rust-industrial-io |
repository | https://github.com/fpagliughi/rust-industrial-io |
max_upload_size | |
id | 98086 |
Cargo.toml error: | TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Rust wrapper for the Linux Industrial I/O user-space library, libiio
. This provides high-performance analog input and output on Linux systems.
Currently this defaults to bindings for libiio v0.25.
To use in an application, add this to Cargo.toml:
[dependencies]
libiio-sys = "0.4"
Bindings for different versions of the C library can be generated using the bindgen command-line tools.
Run bindgen
over the iio.h
header from the desired version of the library, outputting the results to a file,
bindings-<version>_<size>.rs
where <version>
is the libiio version and <size>
is the target CPU word size (typically 32 or 64).
So, for example, this is how we generated them v0.25, on a 64-bit system:
First we cloned the repo and checked out the proper version:
$ git clone https://github.com/analogdevicesinc/libiio.git
$ cd libiio
$ git checkout v0.25
Then into the directory for this repo, we ran bindgen on the header saving the result in the bindings
directory:
$ cd industrial-io/libiio-sys/
$ bindgen ~/libiio/iio.h -o bindings/bindings-0.25_64.rs