Debian Codegraph @

CHANGELOG

raw
1 ## TODO
2
3 ~~TODO: Reader::next_n should return the number of items read as Err(ReadError::Incomplete(n)) if the buffer is exhausted~~
4 * a reader's `.offset()` should reflect the amount of items that were consumed, if any. if a reader can quickly determine
5 there is not enough input, should it return Incomplete(0) or ExhaustedInput? Incomplete(0) vs ExhaustedInput may still
6 imply that some state was changed (an access mode, for example). this needs more thought.
7 TODO: Reader::offset should return an AddressDiff<Address>, not a bare Address
8 * quick look seems reasonable enough, should be changed in concert with
9 yaxpeax-core though and that's more than i'm signing up for today
10 TODO: impls of `fn one` and `fn zero` so downstream users don't have to import num_traits directly
11 * seems nice at first but this means that there are conflicting functions when Zero or One are in scope
12 ... assuming that the idea at the time was to add `fn one` and `fn zero` to `AddressBase`.
13 TODO: 0.4.0 or later:
14 * remove `mod colors`, crossterm dependency, related feature flags
15
16 ## 0.3.2
17
18 fix yaxpeax-arch not building for non-x86 targets when alloc is not enabled
19
20 ## 0.3.1
21
22 fix InstructionTextSink::write_char to not panic in debug builds
23
24 ## 0.3.0
25
26 added a new crate feature flag, `alloc`.
27 this flag is for any features that do not require std, but do require
28 containers from `liballoc`. good examples are `alloc::string::String` or
29 `alloc::vec::Vec`.
30
31 added `yaxpeax_arch::display::DisplaySink` after revisiting output colorization.
32 `DisplaySink` is better suited for general markup, rather than being focused
33 specifically on ANSI/console text coloring. `YaxColors` also simply does not
34 style text in some unfortunate circumstances, such as when the console that
35 needs to be styled is only written to after intermediate buffering.
36
37 `DisplaySink` also includes specializable functions for writing text to an
38 output, and the implementation for `alloc::string::String` takes advantage of
39 this: writing through `impl DisplaySink for String` will often be substantially
40 more performant than writing through `fmt::Write`.
41
42 added `mod color_new`:
43 this includes an alternate vision for `YaxColors` and better fits with the
44 new `DisplaySink` machinery; ANSI-style text markup can be done through the
45 new `yaxpeax_arch::color_new::ansi::AnsiDisplaySink`.
46
47 this provides more flexibility than i'd initially expected! yours truly will
48 be using this to render instructions with HTML spans (rather than ANSI
49 sequences) to colorize dis.yaxpeax.net.
50
51 in the future, `mod colored` will be removed, `mod color_new` will be renamed
52 to `mod color`.
53
54 deprecated `mod colored`:
55 generally, colorization of text is a presentation issue; `trait Colorize`
56 mixed formatting of data to text with how that text is presented, but that is
57 at odds with the same text being presented in different ways for which
58 colorization is not generic. for example, rendering an instruction as marked
59 up HTML involves coloring in an entirely different way than rendering an
60 instruction with ANSI sequences for a VT100-like terminal.
61
62 added `yaxpeax_arch::safer_unchecked` to aid in testing use of unchecked methods
63 these were originally added to improve yaxpeax-x86 testing:
64 https://github.com/iximeow/yaxpeax-x86/pull/17, but are being pulled into
65 yaxpeax-arch as they're generally applicable and overall wonderful tools.
66 thank you again 522!
67
68 added `mod testkit`:
69 this module contains tools to validate the correctness of crates implementing
70 `yaxpeax-arch` traits. these initial tools are focused on validating the
71 correctness of functions that write to `DisplaySink`, especially that span
72 management is correct.
73
74 `yaxpeax-x86`, for example, will imminently have fuzz targets to use these
75 types for its own validation.
76
77 made VecSink's `records` private. instead of extracting records from the struct
78 by accessing this field directly, call `VecSink::into_inner()`.
79
80 made VecSink is now available through the `alloc` feature flag as well as `std`.
81
82 meta: the major omission in this release is an architecture-agnostic way to
83 format an instruction into a `DisplaySink`. i haven't been able to figure out
84 quite the right shape for that! it is fully expected in the future, and will
85 probably end up somehow referenced through `yaxpeax_arch::Arch`.
86
87 ## 0.2.8
88
89 added an impl of `From<ReadError>` for `StandardPartialDecoderError`, matching the existing `StandardDecodeError` impl.
90
91 moved a use of `serde` types to be covered by the relevant cfg flag; using `colors` without `serde` (unlikely) now actually builds.
92
93 fixed up doc comments to build without error.
94
95 (and additional testing permutations to validate cfg flags and doc comments in the future)
96
97 ## 0.2.7
98
99 moved `AnnotatingDecoder` and its associated types to `annotation/`, for module-level documentation about that feature.
100
101 yanked 0.2.6 because there was not yet a user of it other than myself, and it had this feature in the wrong location in the crate.
102
103 ## 0.2.6
104
105 added `AnnotatingDecoder` and associated traits `FieldDescription` and `DescriptionSink` for architectures to report meanings for bit ranges in decoded instructions.
106
107 added `NullSink`, with an `impl<T> DescriptionSink<T> for NullSink` - `NullSink` can always be used to discard instruction annotations. this is mostly useful for shared annotating and non-annotating decode logic.
108
109 added a `docs/` directory for `yaxpeax-arch`: trip reports for `yaxpeax-arch` design. if `yaxpeax` eventually grows an RFC process one day, these are the kind of changes that would get RFC'd.
110
111 added `docs/0001-AnnotatingDecoder.md`, describing motivation and implementation notes of `AnnotatingDecoder`.
112
113 ## 0.2.5
114
115 added `yaxpeax-lc87` to the matrix
116
117 ## 0.2.4
118
119 fix incorrect `Reader` impls of `offset` and `total_offset` on non-`u8` words
120
121 ## 0.2.3
122
123 added `Reader` impls for `U8Reader` on `u16` addresses
124
125 ## 0.2.2
126
127 added `ReaderBuilder` trait and impls for `U8Reader` on various address and word types.
128
129 added documentation for `Reader`, `U8Reader`, and `ReaderBuilder`.
130
131 avoid an unlikely violation of `core::ptr::offset` safety rules on 32-bit architectures.
132
133 ## 0.2.1
134
135 updated architecture matrix
136
137 ## 0.2.0
138
139 correct a bug in 0.1.0 that incorrectly bounded `DecodeError` and did not actually require `std::error::Error`. added a test that `std::error::Error` is actually required of `Arch::DecodeError` in non-std builds.
140
141 ## 0.1.0
142
143 new trait `Reader` to provide a reader of `Arch`-defined `Word`s. in many cases it is acceptable for `Word` to be `u8`, but `yaxpeax-arch` provides pre-defined words `u8`, `U16le`, `U16be`, `U32le`, `U32be`, `U64le`, and `U64be`.
144
145 `yaxpeax_arch::U8Reader` is a struct to read from `&[u8]` that implements `Reader` for all predefined words. it is suitable to read larger words if the minimum word size is still one byte.
146
147 `Decoder` now decodes from a `Reader<A::Address, A::Word>`, to prepare for ISAs where instruction sizes are not multiples of 8 bits.
148
149 `yaxpeax_arch::DecodeError` now requires a `std::error::Error` impl for `std` builds, to support interop with the Rust `error` ecosystem.
150
151 committed to `AddressDiff` being convertable to a primitive with `AddressDiff::to_const`
152 - this addresses the need for hacks to translate an instruction length into a usize
153
154 ## 0.0.5
155
156 swap the `termion` dependency for `crossterm`. this is motivated by improved cross-platform support (notably Windows) as well as removing a type parameter from `Colored` and `YaxColors`.
157
158 ## 0.0.4
159
160 add `AddressDiff`. `LengthedInstruction::len` now return `AddressDiff`. the length of an instruction is the difference between two addresses, not itself an address.
161
162 ## 0.0.3
163
164 `ColorSettings` gets a default impl
165
166 ## 0.0.2
167
168 add `AddressDisplay` to provide a usable interface to display `Address` implementors.
169
170 at the same time, remove `Address::stringy()`. it was a very bad interface, and will not be missed.
171
172 ## 0.0.1
173
174 history starts here