All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.4.0 - 2023-11-13
Changes since v0.3.3
.
- Upgraded
ufmt
from0.1
to0.2
- Upgraded MSRV to
nightly-2023-08-08
0.3.3 - 2023-02-02
Changes since v0.3.2
.
Same change set as v0.1.6
0.2.2 - 2023-02-02
Changes since v0.2.1
.
Same change set as v0.1.6
0.1.6 - 2023-02-02
Changes since v0.1.5
.
- Fixed UB when not using the
lpm-asm-loop
crate feature (which is enabled by default). Thanks to workingjubilee for pointing this out. (#12)
- Removed
read_byte_loop_raw
function, because it is unsound. Thanks to workingjubilee for pointing this out. (#12) - Made the
lpm-asm-loop
crate feature obsolete, because the lpm assembly loop is now the only implementation.
0.3.2 - 2023-01-22
Changes since v0.3.1
.
- Add an
at
method on array wrappers (ProgMem<[T; N]>
), which returns a wrapper to an array element, without loading it, by @gergoerdi (#9) - Add a
wrapper_iter
method on array wrappers (ProgMem<[T; N]>
), which returns aPmWrapperIter
, an iterator of wrappers of each element, by @gergoerdi (#9) - Add similar methods on slice wrappers (
ProgMem<[T]>
) as there are already on array wrappers and anas_slice
method on array wrappers (#11) - Add the "unsize" crate feature that allows to directly coerce
ProgMem
s. - Implement
Copy
,Clone
, andDebug
onProgMem
andPmString
- Lift
Sized
constraint onProgMem
, which allows to wrap types such as slices (tho a slice can not be stored directly in progmem, instead a stored array can be coerce to a slice at runtime) (#11)
0.3.1 - 2022-06-11
Changes since v0.3.0
.
Same change set as v0.2.1
0.2.1 - 2022-06-11
Changes since v0.2.0
.
- Implement
IntoIterator
on array wrappers (i.e.ProgMem<[T;N]>
) by @mutantbob (#7) - A
len
method on array wrappers (i.e.ProgMem<[T;N]>
).
0.3.0 - 2022-06-04
Changes since v0.2.0
.
- Bump MSRV to
nightly-2022-05-10
. - Deny storing a reference in progmem (i.e. a direct
&T
) via theprogmem
macro, this should catch some common mistakes. - Deny storing a
LoadedString
directly in progmem via theprogmem
macro, use the specialstring
rule instead.
- Migrate from
llvm_asm
toasm
. - Use the
addr_of
macro to never ever have a reference to progmem, just raw pointers.
0.2.0 - 2022-04-14
Changes since v0.1.5
.
- Remove the
read_slice
function, because it is based on references to program memory. - Move the
read_value
andread_byte
into the newraw
sub-module. - Move the
ProgMem
struct into the newwrapper
sub-module. ProgMem::new
now must be given a pointer to a value in progmem, instead of a value and being stored in progmem itself.
- Add the
string
sub-module, which adds utilities for storing Unicode strings in progmem, especial useful for non-ASCII strings (#3) - Add an rule to the
progmem
macro to easily store Unicode strings in progmem (see the string section) - Add an rule to the
progmem
macro to create "auto-sized" arrays (see the auto-sizing section) - Add an Arduino-like progmem macro (aka
F
) for inline progmem strings:progmem_str
andprogmem_display
by @mutantbob (#4) - Introudce
nightly-2021-01-07
as MSRV forv0.2.x
(which due to the upcoming changes fromllvm_asm
toasm
, is also the highest supported version forv0.2.x
). - Emit a warning when just storing a reference in progmem instead of the actual data via the
progmem
macro. - Add an
PmIter::iter
method to lazily iterate through an array (loading only one element at a time).
- Change
ProgMem
from a direct value wrapper into a pointer wrapper, thus no more references into program memory are kept only raw pointers (the accessiblestatic
s containing theProgMem
struct are in RAM, the data is stored in hiddenstatic
s in progmem). - Patch
ufmt
to fix u32 formatting (https://github.com/Cryptjar/avr-progmem-rs/commit/9d351038fc31d769206b29cd7228b35aa457b518) - Add the
uno-timing
example as a poor-man's benchmarking suit.
0.1.5 - 2022-04-02
Changes since v0.1.4
.
- Fix UB due to insufficient clobber list of the inline assembly in
read_asm_loop_raw
, which is used if thelpm-asm-loop
crate feature is enabled (which it is by default).
0.1.4 - 2022-04-02
Changes since v0.1.3
.
- Fix
docs.rs
build by excluding all the inline assemblies and disabling the now defunctllvm_asm
Rust feature in documentation builds (we can't upgrade to the newasm
yet, because the current Rust compiler doesn't work for AVR at all).
0.1.3 - 2022-04-02
Changes since v0.1.2
.
- Deprecate
read_slice
function, because it is based on passing around plain slices (aka a reference) to program memory, which is extremely hazardous, if not UB, and thus will not be supported in the future.
- Pin the Rust toolchain to
nightly-2021-01-07
, because at the time of writing it is the latest Rust version that supports AVR (future version are broken, also see rust-lang/compiler-builtins#400). - Add Github CI.
0.1.2 - 2021-01-04
Changes since v0.1.1
.
- Fix
docs.rs
build by excluding the cargo config
0.1.1 - 2021-01-04
Changes since v0.1.0
.
- Use the
.progmem.data
section instead of just.progmem
to keep compatibility withavr-binutils >= 2.30
by @Rahix (#2)
- Setup a cargo config to target the Arduino Uno by default (instead of the host), and allow to run the examples directly via
cargo run
by @Rahix (#2)
Initial release