Skip to content

Commit 2d615e4

Browse files
Release 0.18 (#477)
1 parent 8fad609 commit 2d615e4

File tree

9 files changed

+34
-17
lines changed

9 files changed

+34
-17
lines changed

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
# Changelog
22

33
## [Unreleased]
4-
- Add attributes `seek_from_start`, `seek_from_current`, `seek_from_end`, and `seek_rewind` to control the position of the reader before reading a field ([#360](https://github.com/sharksforarms/deku/pull/360))
4+
5+
## [0.18.0] - 2024-08-07
6+
7+
Usability
8+
- Reading now requires `Seek`. Attributes such as `seek_from_start`, `seek_from_current`, `seek_from_end`, and `seek_rewind` were added to be able to control the position of the reader before reading a field ([#360](https://github.com/sharksforarms/deku/pull/360))
9+
- Support added for unit structs ([#450](https://github.com/sharksforarms/deku/pull/450))
10+
- `to_slice` was added to write an to a slice ([#461](https://github.com/sharksforarms/deku/pull/461))
11+
12+
Performance
13+
- The use of bits parsing is now an optional feature. If bit-level parsing is not useful for your application, you can disable it to get some performance benefits. ([#446](https://github.com/sharksforarms/deku/pull/446))
14+
- Performance of `read_all` was improved ([#441](https://github.com/sharksforarms/deku/pull/441))
15+
16+
Enum improvements
17+
- Added `id_endian` attribute to specify the endianness of `id` ([#476](https://github.com/sharksforarms/deku/pull/476))
18+
- Support for `bool` literals in enum `id` attribute ([#472](https://github.com/sharksforarms/deku/pull/472))
19+
- `id_pat` attribute was re-introduced ([#454](https://github.com/sharksforarms/deku/pull/454))
520

621
## [0.17.0] - 2024-04-23
722

@@ -470,7 +485,9 @@ Community:
470485
- Added `release.toml`
471486
- Added `CHANGELOG.md` to track changes
472487

473-
[Unreleased]: https://github.com/sharksforarms/deku/compare/deku-v0.17.0...HEAD
488+
[Unreleased]: https://github.com/sharksforarms/deku/compare/deku-v0.18.0...HEAD
489+
490+
[0.18.0]: https://github.com/sharksforarms/deku/compare/deku-v0.17.0...deku-v0.18.0
474491

475492
[0.17.0]: https://github.com/sharksforarms/deku/compare/deku-v0.16.0...deku-v0.17.0
476493

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ bits = ["dep:bitvec", "deku_derive/bits"]
3131
[dependencies]
3232
deku_derive = { version = "^0.17.0", path = "deku-derive", default-features = false}
3333
bitvec = { version = "1.0.1", default-features = false, optional = true }
34-
log = { version = "0.4.21", optional = true }
34+
log = { version = "0.4.22", optional = true }
3535
no_std_io = { version = "0.8.0", default-features = false, features = ["alloc"], package = "no_std_io2" }
36-
rustversion = "1.0.16"
36+
rustversion = "1.0.17"
3737

3838
[dev-dependencies]
39-
rstest = "0.19.0"
39+
rstest = "0.22.0"
4040
hexlit = "0.5.5"
4141
criterion = "0.5.1"
4242
alloc_counter = "0.0.4"
43-
trybuild = "1.0.95"
44-
rustc-hash = "1.1.0"
45-
env_logger = "0.11.3"
43+
trybuild = "1.0.99"
44+
rustc-hash = "2.0.0"
45+
env_logger = "0.11.5"
4646
assert_hex = "0.4.1"
4747

4848
[[bench]]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ for binary structs or network headers
2121

2222
```toml
2323
[dependencies]
24-
deku = "0.17"
24+
deku = "0.18"
2525
```
2626

2727
no_std:

deku-derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ syn = "2.0"
2525
# syn = {version = "1.0", features = ["extra-traits"]}
2626
proc-macro2 = "1.0"
2727
darling = "0.20"
28-
proc-macro-crate = { version = "3.1.0", optional = true }
28+
proc-macro-crate = { version = "3.2.0", optional = true }
2929

3030
[dev-dependencies]
31-
rstest = "0.19"
31+
rstest = "0.22"
3232

3333
[lints]
3434
workspace = true

ensure_no_std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ alloc = []
2121
[dependencies]
2222
cortex-m-rt = "0.7.3"
2323
deku = { path = "../", default-features = false, features = ["alloc", "bits"] }
24-
embedded-alloc = "0.5.1"
24+
embedded-alloc = "0.6.0"
2525

ensure_no_std/src/bin/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern crate alloc;
77
use core::panic::PanicInfo;
88

99
use cortex_m_rt::entry;
10-
use embedded_alloc::Heap;
10+
use embedded_alloc::LlffHeap as Heap;
1111

1212
#[global_allocator]
1313
static HEAP: Heap = Heap::empty();

ensure_wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ crate-type = ["cdylib", "rlib"]
1313
default = ["console_error_panic_hook", "wee_alloc"]
1414

1515
[dependencies]
16-
wasm-bindgen = "0.2.92"
16+
wasm-bindgen = "0.2.93"
1717

1818
# The `console_error_panic_hook` crate provides better debugging of panics by
1919
# logging them with `console.error`. This is great for development, but requires

src/impls/hashmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ mod tests {
309309
}
310310

311311
#[rstest(input, endian, expected,
312-
case::normal(fxhashmap!{0x11u8 => 0xAABBu16, 0x23u8 => 0xCCDDu16}, Endian::Little, vec![0x11, 0xBB, 0xAA, 0x23, 0xDD, 0xCC]),
312+
case::normal(fxhashmap!{0x11u8 => 0xAABBu16, 0x23u8 => 0xCCDDu16}, Endian::Little, vec![0x23, 0xDD, 0xCC, 0x11, 0xBB, 0xAA]),
313313
)]
314314
fn test_hashmap_write(input: FxHashMap<u8, u16>, endian: Endian, expected: Vec<u8>) {
315315
let mut writer = Writer::new(Cursor::new(vec![]));

src/impls/hashset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ mod tests {
278278
}
279279

280280
#[rstest(input, endian, expected,
281-
case::normal(vec![0xAABB, 0xCCDD].into_iter().collect(), Endian::Little, vec![0xDD, 0xCC, 0xBB, 0xAA]),
281+
case::normal(vec![0xAABB, 0xCCDD].into_iter().collect(), Endian::Little, vec![0xBB, 0xAA, 0xDD, 0xCC]),
282282
)]
283283
fn test_hashset_write(input: FxHashSet<u16>, endian: Endian, expected: Vec<u8>) {
284284
let mut writer = Writer::new(Cursor::new(vec![]));
@@ -290,7 +290,7 @@ mod tests {
290290
#[cfg(feature = "bits")]
291291
#[rstest(input, endian, bit_size, limit, expected, expected_rest_bits, expected_rest_bytes, expected_write,
292292
case::normal_le([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Little, Some(16), 2.into(), vec![0xBBAA, 0xDDCC].into_iter().collect(), bits![u8, Msb0;], &[], vec![0xCC, 0xDD, 0xAA, 0xBB]),
293-
case::normal_be([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Big, Some(16), 2.into(), vec![0xAABB, 0xCCDD].into_iter().collect(), bits![u8, Msb0;], &[], vec![0xCC, 0xDD, 0xAA, 0xBB]),
293+
case::normal_be([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Big, Some(16), 2.into(), vec![0xAABB, 0xCCDD].into_iter().collect(), bits![u8, Msb0;], &[], vec![0xAA, 0xBB, 0xCC, 0xDD]),
294294
case::predicate_le([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Little, Some(16), (|v: &u16| *v == 0xBBAA).into(), vec![0xBBAA].into_iter().collect(), bits![u8, Msb0;], &[0xcc, 0xdd], vec![0xAA, 0xBB]),
295295
case::predicate_be([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Big, Some(16), (|v: &u16| *v == 0xAABB).into(), vec![0xAABB].into_iter().collect(), bits![u8, Msb0;], &[0xcc, 0xdd], vec![0xAA, 0xBB]),
296296
case::bytes_le([0xAA, 0xBB, 0xCC, 0xDD].as_ref(), Endian::Little, Some(16), BitSize(16).into(), vec![0xBBAA].into_iter().collect(), bits![u8, Msb0;], &[0xcc, 0xdd], vec![0xAA, 0xBB]),

0 commit comments

Comments
 (0)