triple_arena
0.13
- The
dag
module no longer contains the mimicking assertions directly, instead explicitly import them from themimick
submodule - Changed the
opaque_
related functions
- Added
Awi::shrink_to_msb
- Added
Op::Argument
- Added some special
arg
andopaque
functions
- made
EpochKey::pop_off_epoch_stack
return an error rather than panic - made some
from_state
functions public - many optimizations for
starlight
and other consumers ofawint_dag
- added
Bits::range_or
,Bits::range_xor
, andBits::repeat
- Fixed outdated messages, added the
gen_counter_for_pstate
flag
- Various improvements to
awint_dag
forstarlight
- Removed all the old basic epoch structs from
awint_dag
now that they have been implemented instarlight
which will publish a new version.awint_dag
is now basically just a backend forstarlight
and potentially other crates.
- Added the
Awi
struct and corresponding macro, this should replace many usages ofExtAwi
- Added more
awi
todag
From
impls
- The
cc
macro now usesAwi
for dynamic storage - Overhauled the epoch system for
awint_dag
and various related things - Renamed the hidden
len
functions tototal_digits
so that it isn't accidentally used instead ofbw
- bumped MSRV to 1.70.0
triple_arena
0.12
- Replaced some usages of transmutation with fat pointer
as
casts to prevent a technical subtlety that could lead to UB (even if it wouldn't occur with-Zrandomize-layout
in practice) - Finally found a "custom" DST workaround to store the bitwidth inline and derive the slice length
from that instead of using the metadata hack. Note that this currently requires
-Zmiri-tree-borrows
for Miri to accept it.
- Added
Bits::total_cmp
- Added
OrdBits
- Added
Error
impl forEvalError
- Updated "zeroize_support" to use
zeroize
1.6 - Updated to
triple_arena
0.9
- Made "const_support" not a default feature flag
- Fixed that the overflow check in
chars_upper_bound
andbits_upper_bound
was completely broken - Greatly improved the efficiency of
awint
on restricted architectures such as AVR - Fixed that
inlawi!
could cause double the necessary stack usage on all platforms - Macro constants are now compiled down to
&'static [u8]
or&'static Bits
awint
should now theoretically work with 128 bit architectures like riscv128
- Added
Digit
, a type alias for the underlying storage element forBits
. Also added various primitive related functions for it. - Added feature flags to control
Digit
- Added the
bits
macro for creating&'static Bits
constants easily - Enabled
const
PartialEq
- Replaced
usize
withDigit
where applicable. This does not immediately change things for common architectures, butDigit
can be different fromusize
now. - Renamed
short_
functions todigit_
functions - Added missing
_
suffix todigit_cin_mul_
Digit
has a minimum guaranteed maximum value ofu8::MAX
rather thanu16::MAX
const_as_ref
andconst_as_mut
removed fromInlAwi
andExtAwi
(although it still exists as a hidden function onBits
for macro purposes)- Many changes to hidden and unstable items
- Added a limiter to
FP::to_vec_general
and downstream string formatting to prevent easy resource exhaustion problems. Note thatmax_ufp
is set to 4096 for default formatters. - Fixed that '_'s in the fraction of
ExtAwi::from_bytes_general
could cause incorrect results. - Fixed that
ExtAwi::from_str
could allow effectively empty integers like "_u8"
- Added
FP::floating_
- Added IEEE-754 related items for
FP
- Added fixed point support to
ExtAwi::from_str
to quickly leverageExtAwi::from_str_general
- MSRV 1.66
- Added
zeroize
support - Added mimicking
Option
andResult
types andtry_support
to support using them with?
- Added mimicking assertions and made
awint_dag
actually respect invalid bitwidths and values
- Refactored the
awi
,dag
, andprelude
modules - Renamed all
*_assign
functions to*_
functions - Renamed
funnel
tofunnel_
- Renamed
rand_assign_using
torand_
- Renamed
Node
andDag
toOpNode
andOpDag
- Updated
triple_arena
version, which changes some things inawint_dag
- Many improvements to
awint_dag
- Added
#[must_use]
where applicable - Added
Bits::mux_
- First workable version of
awint_dag
- Renamed
Bits::lut
toBits::lut_
- Added a second generic to some
FP
functions that allows differentBorrow<Bits>
types to work together
- Fixed that the infallibility of some macros was being calculated wrong. A few macros now return
Option
s to prevent hidden panics and other macros have become infallible. - Fixed
const_support
for Rust 1.64
- Added missing
from_...
andFrom<...>
impls toInlAwi
andExtAwi
- Fixed that
to_u8_slice
on big endian platforms did not zero bytes beyondself.bw()
. There was a blind spot in the testing that has been fixed. - Fixed error E0716 in many cases for the macros.
- Overhaul of the macros. Uses proper token tree parsing that fixes many long standing issues. Nested macros and complex inner expressions with brackets, commas, and semicolons not belonging to the outside macro are now possible. Trailing commas and semicolons are allowed.
- Note: in order for some expressions to remain const, you need to add
#![feature(const_trait_impl)]
to your crate root, or else you will run into strangeerroneous constant used
andderef_mut
errors. - Note: certain reference patterns of a form like
fn(awi_ref: &mut Bits) {cc!(1u8; awi_ref)}
are broken by the workaround for E0716. This can be fixed by making the reference mutablefn(mut awi_ref: &mut Bits) {...}
. - Note: the old specified initialization macros such as
extawi_[init]!(...)
can be replaced byextawi!([init]: ...)
. The old initialization macros also had a feature where a single literal with no suffix could be interpreted as a bitwidth (e.x.inlawi_zero!(64)
), but this functionality has been removed and instead fillers should be used (e.x.inlawi!(zero: ..64)
). - Implemented
Copy
forFP<B>
ifB: Copy
- Added more specializations of
Bits::field
and used them to improve macro performance - Added
Bits::sig
as a shorthand forx.bw() - x.lz()
- Added direct
InlAwi::from_X
functions
- Fixed a stacked borrows violation in the permutation functions. CI now runs the latest Miri with
-Zmiri-strict-provenance
to prevent issues like this from being introduced in the future. - Fixed the macros in cases where the build architecture pointer size and target architecture
pointer size is different. The CI successfully runs the full test suite on
mips-unknown-linux-gnu
which is a 32 bit big endian architecture.
- A few hidden functions were added and removed, and you may need to import
Bits
in more cases because of the changes to macros.
- Fixed that string deserialization functions with radix higher than 10 could accept chars that they shouldn't
- Had to remove
Bits::as_bytes
andBits::as_bytes_mut
because they were fundamentally broken on big endian architectures. Fixed all affected functions (exceptHash
related ones) so that they are actually consistent across architectures.
- Added the portable
Bits::u8_slice_
andBits::to_u8_slice
functions. - The hidden functions
Bits::as_bytes_full_width_nonportable
and its mutable counterpart were added for situations where direct byte slice references are needed, but note that these need a lot of special handling to make them portable.
- Fixed that version 0.1 was broken by Rustc 1.59.0-nightly.
- Updated to 2021 edition
neg_
now takes a boolean that conditionally activates it- Some string conversion functions no longer include a sign indicator in their output, and accept empty strings as 0
- Renamed all
_triop
functions to_assign
functions. The short divisions are differentiated by_inplace_
. - Removed standard ops that hid panics.
- Implemented
Deref
forInlAwi
andExtAwi
.const_as_ref
andconst_as_mut
can be elided in many circumstances now. - Added generic
FP
struct for fixed-point arithmetic andFPType
- Added
const_nzbw
andconst_bw
toInlAwi
- Added
lut_set
,neg_add_
,mul_
,arb_umul_add_
, andarb_imul_add_
toBits
- Added
from_bytes_general
andfrom_str_general
toExtAwi