-
Notifications
You must be signed in to change notification settings - Fork 9
/
ChangeLog.txt
125 lines (102 loc) · 4.17 KB
/
ChangeLog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
4.0.2
------
- Fix no-std support and add a CI job testing for it (https://github.com/smessmer/binary-layout/pull/25 and https://github.com/smessmer/binary-layout/pull/28 )
- Add CI jobs checking this crate for SemVer-breaking API changes
- Fix codecov CI job
4.0.1
------
- Fix broken links in README
4.0.0
------
This release adds supports for types that can throw errors when reading or writing.
New primitive types supported:
- `std::num::NonZeroXXX` types
- `bool as u8` (only `0` and `1` are valid representations, others will throw errors when read)
- `char as u32` (invalid unicode will throw errors when read)
When reading any of those types, the `read()` function will not be available and instead there will be a `try_read()` function.
The `LayoutAs` trait changed and if you're using that to define custom data types, then you now need to implement `try_read` / `try_write`
instead of `read` / `write`.
If reading and/or writing your type cannot fail, you can set the corresponding error type to `std::convert::Infallible`.
That will ensure that your type will have the `read() / write()` functions available on your layout fields.
For any other error types, you will have to access the fields using calls to `try_read() / try_write()`.
**Backwards compatibility:**
Most code should remain backwards compatible, but there are a few scenarios that require you to change your code:
- Updated MSRV to 1.59
- If you did not use `use binary_layout::prelude::*` but instead imported the `binary_layout` traits manually, then you may have to add an import to
`FieldReadExt` and `FieldWriteExt` because that is where the `read()` and `write()` methods that were previously on `FieldCopyAccess` moved to.
- Types implementing `LayoutAs` now need to be `Sized`.
- The `LayoutAs` trait changed. You now need to implement `try_read` and `try_write` instead of `read` and `write` and define the corresponding error types.
- Renamed `define_layout!` macro to `binary_layout!`. For now, `define_layout!` still works but will show a deprecation warning and it will be removed in a future version.
3.3.0
------
- Reduce minimal dependency version requirements to what's actually needed and add a CI task ensuring that those versions are sufficient
3.2.0
------
- Add `NativeEndian` as an option
3.1.4
------
- Fix compiler warnings issued by newer version of rust
3.1.3
------
- Specify MSRV in Cargo.toml
- Improve CI setup
3.1.2
------
- Fixed clippy warnings
- Fixed broken doc links and documentation typos
- Use caret in dependency versions (i.e. depend on `^0.8` instead of `0.8`)
3.1.1
------
- Fixed clippy warnings
3.1.0
------
- Fixed-size array fields (i.e. `[u8; N]`) now return `&[u8; N]` instead of `&[u8]` when accessed
- Fix no_std compatibility
- Add Data::into_slice()
3.0.0
------
Backward compatibility breaking changes:
- Simplify slice API in views: `layout.field_mut()` instead of `layout.field_mut().data_mut()`
- Removed SizedField::SIZE and added Field::SIZE as an Option<usize> (None if the field is open ended). This change breaks backwards compatibility for code using the SIZE field.
- Move some exported names into the "internal" namespace to denote that they're not supposed to be used in user code
Other changes:
- Added support for nested layouts
- Added the ::SIZE constant for returning the size of a whole layout.
- Added support for f32 and f64
- Added support for unit (`()`)
- Guard against users accidentally calling internal macros by marking them with '@'
- Fix some doc links
- Add inline annotations for better performance
2.1.0
------
- Add feature to use this in no-std builds
- Added support for i128 and u128
2.0.1
------
- Fix documentation issues
2.0.0
------
- Improve documentation, e.g. include layout definition in documentation for the generated code
- Allow defining custom field types by implementing the LayoutAs trait
- Refactor: Simplify traits and their dependencies
1.0.1
------
- Fix dependencies on third party macros
1.0.0
------
- Add Code Coverage to CI
- Improve documentation
0.3.0
------
- Improve README.md
- Improve documentation
- More unit tests
- Fix clippy lints
- Add View::into_storage()
0.2.0
------
- Improve README.md
- Add LICENSE files
0.1.0
------
- Initial version