@@ -5,7 +5,9 @@ All notable changes will be documented in this file.
5
5
This document is written according to the [ Keep a Changelog] [ kac ] style.
6
6
7
7
1 . [ 0.18.0] ( #0180 )
8
+ 1 . [ Bit Arrays in Value Position] ( #bit-arrays-in-value-position )
8
9
1 . [ Type-Level Alias Detection] ( #type-level-alias-detection )
10
+ 1 . [ 0.17.4] ( #0174 )
9
11
1 . [ 0.17.3] ( #0173 )
10
12
1 . [ 0.17.2] ( #0172 )
11
13
1 . [ 0.17.1] ( #0171 )
@@ -38,22 +40,60 @@ This document is written according to the [Keep a Changelog][kac] style.
38
40
39
41
## 0.18.0
40
42
43
+ This release was implemented as a total discard and rewrite of the crate. The
44
+ rewrite is * largely* a copy of what was discarded, but the crate has been
45
+ rebuilt from nothing in order to provide more confidence that all parts of it
46
+ were reached. As such, this release has a * lot* of changes.
47
+
48
+ This release raises the MSRV to ` 1.44.0 ` , as [ Rust PR #69373 ] stabilizes the
49
+ integer constructors ` from_{b,l,n}e_bytes ` and removes the need to reïmplement
50
+ them internally.
51
+
41
52
### Added <!-- omit in toc -->
42
53
43
- The CI test harness now covers targets beyond ` x86_64-unknown-linux-gnu ` , thanks
44
- to GitHub user [ @Alexhuszagh ] . ` bitvec ` guarantees support for all targets
45
- listed in the CI matrix through at least the next major relase. If your target
46
- is not in this list, please file an issue for inclusion.
54
+ - The CI test harness now covers targets beyond ` x86_64-unknown-linux-gnu ` ,
55
+ thanks to GitHub user [ @Alexhuszagh ] . ` bitvec ` guarantees support for all
56
+ targets listed in the CI matrix through at least the next major relase. If
57
+ your target is not in this list, please file an issue for inclusion.
58
+
59
+ - ` BitStore ` is implemented on the ` AtomicUN ` corresponding to each ` uN ` that
60
+ implements ` BitStore ` , as well as on ` Cell<uN> ` .
61
+
62
+ #### Bit Arrays in Value Position
63
+
64
+ The ` BitArray<O, V> ` type begins support for emulating the C++ ` std::bitset<N> `
65
+ type, parameterized over the length in bits. This has been requested in the
66
+ past, such as in GitHub [ issue #32 ] , and is still (as of writing) not able to be
67
+ * correctly* implemented. Instead, ` BitArray ` is parameterized by a scalar or
68
+ array type that is large enough to hold the number of bits that the user wants.
69
+
70
+ The ` bitarr! ` macro constructs either values of ` BitArray<O, V> ` with the same
71
+ syntax as the other three macros, or constructs ` BitArary<O, V> ` typenames
72
+ suitable for a number of bits in a given order/store array. Invoked as
73
+ ` bitarr!(for BITS, in ORDER, STORE) ` , it produces a typename that can be used to
74
+ correctly type locations that cannot use inference from a value assigned into
75
+ them, such as ` struct ` fields, ` static ` bindings, and ` const ` values.
76
+
77
+ Until type-level integers stabilize, this is the closest solution to the
78
+ ` std::bitset<N> ` behavior that ` bitvec ` can provide.
47
79
48
80
### Changed <!-- omit in toc -->
49
81
50
- The implementation of the ` BitStore ` trait is refactored to fully separate the
51
- concepts of memory storage and access. This is not a breaking change to the user
52
- API, as ` BitStore ` is an opaque trait that can only be used in marker position.
82
+ - The implementation of the ` BitStore ` trait is refactored to fully separate the
83
+ concepts of memory storage and access. This is not a breaking change to the
84
+ user API, as ` BitStore ` is an opaque trait that can only be used in marker
85
+ position.
86
+
87
+ - The concrete effect of the ` BitStore ` internal refactor is that the default
88
+ case of memory access is no longer atomic. Slices that have not called
89
+ ` .split_at_mut ` are now guaranteed to elide bus locks to memory when they
90
+ write.
53
91
54
- The concrete effect of the ` BitStore ` internal refactor is that the default case
55
- of memory access is no longer atomic. Slices that have not called
56
- ` .split_at_mut ` are now guaranteed to elide bus locks to memory when they write.
92
+ - The ` AsBits ` trait has been relocated to the ` view ` module, and split into two
93
+ trait families. The ` BitView ` trait has methods ` .view_bits<O> ` and
94
+ ` .view_bits_mut<O> ` ; the ` AsBits<T> ` and ` AsBitsMut<T> ` traits have
95
+ ` .as_bits<O> ` and ` .as_bits_mut<O> ` , and are intended to correspond to the
96
+ ` AsRef<T> ` and ` AsMut<T> ` traits in the standard library.
57
97
58
98
#### Type-Level Alias Detection
59
99
@@ -92,6 +132,31 @@ unaliased components.
92
132
` .as_slice() ` /` .as_mut_slice() ` if you require direct access to backing
93
133
storage.
94
134
135
+ ## 0.17.4
136
+
137
+ ### Fixed <!-- omit in toc -->
138
+
139
+ GitHub user [ @kulp ] noted in [ Issue #55 ] that an allocator error occurred when
140
+ attempting to free a large ` BitBox ` on macOS. The underlying cause was found to
141
+ be an improper assembly of a ` BitBox ` after modifying the underlying allocation.
142
+ Specifically, ` BitBox ` relied on an incorrect assumption that
143
+ ` Vec::into_boxed_slice ` never moved the base address during resizing.
144
+
145
+ ### Yanked Versions <!-- omit in toc -->
146
+
147
+ ** This is a severe memory error!** As such, * all* prior versions of ` bitvec `
148
+ have been yanked from [ crates.io] [ crate ] . Cargo will fetch yanked crates that
149
+ are listed in ` Cargo.lock ` , but will not use them for resolution of the
150
+ ` Cargo.toml ` manifest.
151
+
152
+ If you feel strongly that you cannot upgrade from a prior minor version, please
153
+ file an issue and I will backport this fix and publish a patch on your minor
154
+ series. I will also work with you on an upgrade path.
155
+
156
+ I have made the decision to yank prior versions as this is now the second memory
157
+ management error in the ` 0.17 ` series, and is demonstrated to exist back to
158
+ ` 0.11 ` . Versions older than ` 0.11 ` are not supported.
159
+
95
160
## 0.17.3
96
161
97
162
### Fixed <!-- omit in toc -->
@@ -756,38 +821,43 @@ Initial implementation and release.
756
821
- ` BitVec ` type with basic ` Vec ` idioms and parallel trait implementations
757
822
- ` bitvec! ` generator macro
758
823
759
- [ @Alexhuszagh ] : //github.com/Alexhuszagh
760
- [ @Fotosmile ] : //github.com/Fotosmile
761
- [ @GeorgeGkas ] : //github.com/GeorgeGkas
762
- [ @ImmemorConsultrixContrarie ] : //github.com/ImmemorConsultrixContrarie
763
- [ @caelunshun ] : //github.com/caelunshun
764
- [ @geq1t ] : //github.com/geq1t
765
- [ @jonas-schievink ] : //github.com/jonas-schievink
766
- [ @koushiro ] : //github.com/koushiro
767
- [ @luojia65 ] : //github.com/luojia65
768
- [ @lynaghk ] : //github.com/lynaghk
769
- [ @mystor ] : //github.com/mystor
770
- [ @obeah ] : //github.com/obeah
771
- [ @overminder ] : //github.com/overminder
772
- [ @ratorx ] : //github.com/ratorx
773
- [ @schomatis ] : //github.com/schomatis
774
- [ @torce ] : //github.com/torce
775
- [ Issue #7 ] : //github.com/myrrlyn/bitvec/issues/7
776
- [ Issue #8 ] : //github.com/myrrlyn/bitvec/issues/8
777
- [ Issue #9 ] : //github.com/myrrlyn/bitvec/issues/9
778
- [ Issue #10 ] : //github.com/myrrlyn/bitvec/issues/10
779
- [ Issue #12 ] : //github.com/myrrlyn/bitvec/issues/12
780
- [ Issue #15 ] : //github.com/myrrlyn/bitvec/issues/15
781
- [ Issue #16 ] : //github.com/myrrlyn/bitvec/issues/16
782
- [ Issue #17 ] : //github.com/myrrlyn/bitvec/issues/17
783
- [ Issue #28 ] : //github.com/myrrlyn/bitvec/issues/28
784
- [ Issue #33 ] : //github.com/myrrlyn/bitvec/issues/33
785
- [ Issue #35 ] : //github.com/myrrlyn/bitvec/issues/35
786
- [ Issue #36 ] : //github.com/myrrlyn/bitvec/issues/36
787
- [ Issue #40 ] : //github.com/myrrlyn/bitvec/issues/40
788
- [ Issue #43 ] : //github.com/myrrlyn/bitvec/issues/43
789
- [ Issue #50 ] : //github.com/myrrlyn/bitvec/issues/50
790
- [ Pull Request #34 ] : //github.com/myrrlyn/bitvec/pull/34
791
- [ Pull Request #41 ] : //github.com/myrrlyn/bitvec/pull/41
792
- [ `Sync` ] : //doc.rust-lang.org/stable/core/marker/trait.Sync.html
793
- [ kac ] : //keepachangelog.com/en/1.0.0/
824
+ [ @Alexhuszagh ] : https://github.com/Alexhuszagh
825
+ [ @Fotosmile ] : https://github.com/Fotosmile
826
+ [ @GeorgeGkas ] : https://github.com/GeorgeGkas
827
+ [ @ImmemorConsultrixContrarie ] : https://github.com/ImmemorConsultrixContrarie
828
+ [ @caelunshun ] : https://github.com/caelunshun
829
+ [ @geq1t ] : https://github.com/geq1t
830
+ [ @jonas-schievink ] : https://github.com/jonas-schievink
831
+ [ @koushiro ] : https://github.com/koushiro
832
+ [ @kulp ] : https://github.com/kulp
833
+ [ @luojia65 ] : https://github.com/luojia65
834
+ [ @lynaghk ] : https://github.com/lynaghk
835
+ [ @mystor ] : https://github.com/mystor
836
+ [ @obeah ] : https://github.com/obeah
837
+ [ @overminder ] : https://github.com/overminder
838
+ [ @ratorx ] : https://github.com/ratorx
839
+ [ @schomatis ] : https://github.com/schomatis
840
+ [ @torce ] : https://github.com/torce
841
+ [ Issue #7 ] : https://github.com/myrrlyn/bitvec/issues/7
842
+ [ Issue #8 ] : https://github.com/myrrlyn/bitvec/issues/8
843
+ [ Issue #9 ] : https://github.com/myrrlyn/bitvec/issues/9
844
+ [ Issue #10 ] : https://github.com/myrrlyn/bitvec/issues/10
845
+ [ Issue #12 ] : https://github.com/myrrlyn/bitvec/issues/12
846
+ [ Issue #15 ] : https://github.com/myrrlyn/bitvec/issues/15
847
+ [ Issue #16 ] : https://github.com/myrrlyn/bitvec/issues/16
848
+ [ Issue #17 ] : https://github.com/myrrlyn/bitvec/issues/17
849
+ [ Issue #28 ] : https://github.com/myrrlyn/bitvec/issues/28
850
+ [ Issue #32 ] : https://github.com/myrrlyn/bitvec/issues/32
851
+ [ Issue #33 ] : https://github.com/myrrlyn/bitvec/issues/33
852
+ [ Issue #35 ] : https://github.com/myrrlyn/bitvec/issues/35
853
+ [ Issue #36 ] : https://github.com/myrrlyn/bitvec/issues/36
854
+ [ Issue #40 ] : https://github.com/myrrlyn/bitvec/issues/40
855
+ [ Issue #43 ] : https://github.com/myrrlyn/bitvec/issues/43
856
+ [ Issue #50 ] : https://github.com/myrrlyn/bitvec/issues/50
857
+ [ Issue #55 ] : https://github.com/myrrlyn/bitvec/issues/55
858
+ [ Pull Request #34 ] : https://github.com/myrrlyn/bitvec/pull/34
859
+ [ Pull Request #41 ] : https://github.com/myrrlyn/bitvec/pull/41
860
+ [ Rust PR #69373 ] : https://github.com/rust-lang/rust/pull/69373/
861
+ [ `Sync` ] : https://doc.rust-lang.org/stable/core/marker/trait.Sync.html
862
+ [ crate ] : https://crates.io/crates/bitvec
863
+ [ kac ] : https://keepachangelog.com/en/1.0.0/
0 commit comments