Skip to content

Commit f024d91

Browse files
committed
Renamed 'iio_info_rs' to 'riio_info'. Updated versions, README, and CHANGELOG for v0.6.0 release.
1 parent 365f0bc commit f024d91

File tree

5 files changed

+38
-31
lines changed

5 files changed

+38
-31
lines changed

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
### Unreleased Features
8+
### [v0.6.0](https://github.com/fpagliughi/rust-industrial-io/compare/v0.5.2..v0.6.0) - 2024-12-10
99

1010
- Upgraded to Rust Edition 2021, MSRV 1.73.0
1111
- New bindings in the -sys crate for _libiio_ v0.24 & v0.25
12-
- Build features to select the version of bindings to match the installed target _libiio_, with several options.
13-
- Conditional features based on the version of _libiio_.
12+
- Cargo build features for selecting bindings to older libiio versions (v0.24, v0.23, etc)
13+
- Conditional features based on the version of _libiio_.
1414
- Updated examples and utils to use `clap` v3.2, with forward-looking implementation.
15-
- Added _buildtst.sh_ for local CI testing.
15+
- Added _buildtst.sh_ script for local CI testing. This runs the cargo _check, test, clippy,_ and _doc_ for the latest stable compiler and the MSRV.
1616
- Fixed new clippy warnings.
17+
- Updated `nix` dependency to v0.29
18+
- Renamed `iio_info_rs` to `riio_info` to be compatible with naming of other utilities and examples.
19+
- Converted to explicit re-exports to avoid ambigious warnings.
20+
- Added a mutable iterator for channel data in a buffer (to fill the buffer)
21+
- Added lifetime to buffer iterator so as not to outlive the buffer.
22+
- [Breaking]: Buffer iterator now returns a reference to the item in the buffer, to be consistent with mutable iterator and slice iterators.
23+
- [PR #28](https://github.com/fpagliughi/rust-industrial-io/pull/28)- Move set_num_kernel_buffers() to Device
24+
- [PR #22](https://github.com/fpagliughi/rust-industrial-io/pull/22)- Disable chrono default features to mitigate segfault potential in time crate
25+
- Added initial CI support to test building and format. (Still can't run unit tests in CI due to iio kernel module requirements).
1726

1827

1928
### [v0.5.2](https://github.com/fpagliughi/rust-industrial-io/compare/v0.5.1..v0.5.2) - 2023-02-03

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "industrial-io"
3-
version = "0.6.0-pre.0"
3+
version = "0.6.0"
44
edition = "2021"
55
rust-version = "1.73.0"
66
authors = ["Frank Pagliughi <[email protected]>"]
@@ -23,7 +23,7 @@ libiio_v0_21 = ["libiio-sys/libiio_v0_21"]
2323
libiio_v0_19 = ["libiio-sys/libiio_v0_19"]
2424

2525
[dependencies]
26-
libiio-sys = { version = "0.4.0-pre.0", path = "libiio-sys", default-features = false }
26+
libiio-sys = { version = "0.4", path = "libiio-sys", default-features = false }
2727
thiserror = "1.0"
2828
nix = "0.29"
2929
clap = { version = "3.2", features = ["cargo"], optional = true }
@@ -39,7 +39,7 @@ anyhow = "1.0"
3939
# ----- Utilities -----
4040

4141
[[bin]]
42-
name = "iio_info_rs"
42+
name = "riio_info"
4343
required-features = ["utilities"]
4444

4545
[[bin]]

README.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Contributions to this project are gladly welcomed. Just keep a few things in min
2222
- Please keep individual Pull Requests to a single topic.
2323
- Please do not reformat code with other updates. Any code reformatting should be in a separate commit or PR. The formatting specification is in `.rustfmt.toml` and currently requires the _nightly_ release.
2424

25-
Contributions are particularly welcome for any adjustments or feedback pertaining to different IIO device. If you test, work, or have any trouble with specific IIO hardware or drivers, let us know.
25+
Contributions are particularly welcome for any adjustments or feedback pertaining to different IIO devices. If you test, work, or have any trouble with specific IIO hardware or drivers, let us know.
2626

2727
New examples for different hardware are also requested.
2828

@@ -38,27 +38,25 @@ To keep up with the latest announcements for this project, follow:
3838

3939
**Twitter:** [@fmpagliughi](https://twitter.com/fmpagliughi)
4040

41-
### Unreleased Features in this Branch (Upcoming v0.6)
42-
43-
- Targeting Rust Edition 2021 with MSRV v1.73
41+
### New Features in v0.6
42+
43+
- Upgraded to Rust Edition 2021, MSRV 1.73.0
44+
- New bindings in the -sys crate for _libiio_ v0.24 & v0.25
45+
- Cargo build features for selecting bindings to older libiio versions (v0.24, v0.23, etc)
46+
- Conditional features based on the version of _libiio_.
47+
- Updated examples and utils to use `clap` v3.2, with forward-looking implementation.
48+
- Added _buildtst.sh_ script for local CI testing. This runs the cargo _check, test, clippy,_ and _doc_ for the latest stable compiler and the MSRV.
49+
- Fixed new clippy warnings.
50+
- Updated `nix` dependency to v0.29
51+
- Renamed `iio_info_rs` to `riio_info` to be compatible with naming of other utilities and examples.
4452
- Converted to explicit re-exports to avoid ambigious warnings.
4553
- Added a mutable iterator for channel data in a buffer (to fill the buffer)
4654
- Added lifetime to buffer iterator so as not to outlive the buffer.
4755
- [Breaking]: Buffer iterator now returns a reference to the item in the buffer, to be consistent with mutable iterator and slice iterators.
4856
- [PR #28](https://github.com/fpagliughi/rust-industrial-io/pull/28)- Move set_num_kernel_buffers() to Device
4957
- [PR #22](https://github.com/fpagliughi/rust-industrial-io/pull/22)- Disable chrono default features to mitigate segfault potential in time crate
50-
- Updated to `clap` v3.2
51-
- Support and bindings for libiio v0.25
52-
- Cargo build features for selecting bindings to older libiio versions (v0.24, v0.23, etc)
5358
- Added initial CI support to test building and format. (Still can't run unit tests in CI due to iio kernel module requirements).
5459

55-
### New in Version 0.5.2
56-
57-
- [PR #26](https://github.com/fpagliughi/rust-industrial-io/pull/26) - Added 'utilities' feature to be able to turn off build of binary applications (i.e. only build the library).
58-
- [#21](https://github.com/fpagliughi/rust-industrial-io/issues/21) - Update nix dependency to avoid linking vulnerable version
59-
- Updated dependencies for `clap` and `ctrlc` crates.
60-
61-
6260

6361
## The Basics
6462

@@ -107,12 +105,12 @@ Often, however, when using separate threads to manage each device, it can be mor
107105

108106
### Thread Safety
109107

110-
Early versions of this library (v0.4.x and before) were written with the mistaken belief that the underling _libiio_ was not thread-safe. Some public information about the library was a little misleading, but with input from a maintainers of the library and additional published information, thread restrictions are slowly being lifted from this library.
108+
Early versions of this library (v0.4.x and before) were written with the mistaken belief that the underling _libiio_ was not thread-safe. Some public information about the library was a little misleading, but with input from a _libiio_ maintainers and additional published information, thread restrictions are slowly being lifted from this library.
111109

112110
Starting in v0.5, the following is now possible:
113111

114112
- `InnerContext`, which actually wraps the C library context, is now `Sync` in addition to being `Send`. It can be shared between threads.
115-
- `Context` is now implemented with an `Arc` to point to its `InnerContext`. So these references to the inner context can be sent to different threads and those threads can share the same context.
113+
- `Context` is now implemented with an `Arc` to point to its `InnerContext`. So these references to the inner context can be quickly cloned and sent to different threads, where those threads will then share the same context.
116114
- The `Device` objects, which hold a `Context` reference, are now `Send`. They can be moved to a different thread than the one that created the context.
117115
- For now, the `Channel` and `Buffer` objects are still `!Send` and `!Sync`, and need to live in the same thread with the `Device`, but these restrictions may be loosened as we figure out which specific operations are not thread safe.
118116
- The `Buffer::refill()` function now take a mutable reference to self, `&mut self`, in preparation of loosening thread restrictions on the buffer. The buffer definitely can not be filled by two different threads at the same time.
@@ -128,7 +126,7 @@ One way is to do a "deep" clone of a context and send it to the other thread:
128126

129127
let ctx = Context::new()?;
130128
let thr_ctx = ctx.try_deep_clone()?;
131-
129+
132130
thread::spawn(move || {
133131
let dev = thr_ctx.find_device("somedevice")?
134132
// ...
@@ -191,7 +189,7 @@ Install _libiio_ v0.21 on the target board. If you're developing on a Linux host
191189

192190
### Check the version on the target
193191

194-
If you're using a BeagleBone Black, an old library may have shipped with the distro. Install the latest distribution for the board. (This was tested with _Debian 9.5 2018-10-07 4GB SD IoT_).
192+
If you're using a maker board, such as a BeagleBone, an old library may have shipped with the distro. Install the latest distribution for the board.
195193

196194
Log onto the board and check the version:
197195

@@ -200,7 +198,7 @@ $ iiod --version
200198
0.21
201199
```
202200

203-
If this is less than 0.21, remove the Debian packages and install from sources.
201+
If this is an old version, it would be best to remove the Debian packages and install from sources.
204202

205203
First, get rid of the existing library and utilities:
206204

@@ -220,9 +218,9 @@ And then download the library sources and build:
220218

221219
```
222220
$ cd /tmp
223-
$ wget https://github.com/analogdevicesinc/libiio/archive/v0.21.tar.gz
224-
$ tar -xf v0.21.tar.gz
225-
$ cd libiio-0.21/
221+
$ wget https://github.com/analogdevicesinc/libiio/archive/v0.25.tar.gz
222+
$ tar -xf v0.25.tar.gz
223+
$ cd libiio-0.25/
226224
$ mkdir build ; cd build
227225
$ cmake .. && make && sudo make install
228226
```
@@ -231,7 +229,7 @@ Then check that the version installed properly:
231229

232230
```
233231
$ iiod --version
234-
0.21
232+
0.25
235233
```
236234

237235
## Build the Rust Crate

libiio-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libiio-sys"
3-
version = "0.4.0-pre.0"
3+
version = "0.4.0"
44
edition = "2021"
55
rust-version = "1.73.0"
66
authors = ["Frank Pagliughi <[email protected]>"]
File renamed without changes.

0 commit comments

Comments
 (0)