NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1515 most downloaded on crates.io
Const equivalents of std functions, compile-time comparison, and parsing
Last release 5 months ago
16 Apr 2026
Release timing varies
gaps range from 8 days to 8 months
Most releases are documented
notes for 30 of 43 stable releases
3 versions withdrawn
withdrawn after publishing
6 years old
46 releases · first in 2021
One column per quarter.
This release adds a destructure_rec macro for nested destructuring into maybe-Drop types and ArrayBuilder::{extend_from_array, extend_from_slice} meth
This release adds a destructure_rec macro for nested destructuring into maybe-Drop types and ArrayBuilder::{extend_from_array, extend_from_slice} methods.
Added "konst_proc_macros" feature
Changed "parsing_proc" feature to also enable the "konst_proc_macros" feature.
Added ArrayBuilder::{extend_from_array, extend_from_slice} methods
Added destructure_rec macro (requires "konst_proc_macros" feature)
This release features the from_fn_nd and map_nd array macros for supporting non-local returns in const, and map_while , reduce , step_by iterator meth
This release features the from_fn_nd and map_nd array macros for supporting non-local returns in const, and map_while, reduce,step_by iterator methods.
Added these methods to iterator macros:
map_whilereducestep_byFixed support of iterators of drop type in iterator macros. Previously drop items could only be produced by iterator methods, the input iterator could not be drop itself, now it can be.
Changed implementations of "cmp"-feature-requiring methods in konst::iter::eval to support drop types.
Added these macros in konst::array (these require the "iter" feature):
konst::array::from_fn_ndkonst::array::map_ndAdded of_assumed_nondrop constructors to:
konst::array::ArrayBuilderkonst::array::IntoIterAdded reexport of const_panic::unwrap_err in konst::result
Nothing published for this version
the change from using methods that take and return Self by value to using &mut self for mutating methods (which unlocks being able to iterate over arr
This release features:
Self by value to using &mut self for mutating methods (which unlocks being able to iterate over arrays by value!)among other changes.
Removed these items because there is an equivalent built-in replacement:
konst::alloc_type::COW_STR_NEW: replaced by const { Cow::Borrowed("") }konst::alloc_type::STRING_NEW: replaced by const { String::new() }konst::alloc_type::VEC_NEW: replaced by const { Vec::new() }konst::chr::from_u32_uncheckedkonst::chr::from_u32konst::ffi::cstr: CStr constructors are const, unwrappable with konst::result::unwrapkonst::konst macro: replaced by const { } blockskonst::maybe_uninit::as_mut_ptrkonst::maybe_uninit::as_ptrkonst::maybe_uninit::assume_init_refkonst::maybe_uninit::assume_initkonst::maybe_uninit::UNINIT: replaced by const { MaybeUninit::uninit() }konst::option::copiedkonst::option::flattenkonst::option::NONE: replaced by const { None }konst::option::unwrapkonst::primitive::parse_i* functions: replaced by integer from_str_radix methods, unwrappable with konst::result::unwrapkonst::primitive::parse_u* functions: replaced by integer from_str_radix methods, unwrappable with konst::result::unwrapkonst::ptr::as_mut: replaced by &mut *pointerkonst::ptr::as_ref: replaced by &*pointerkonst::ptr::nonnull::as_mutkonst::ptr::nonnull::as_refkonst::slice::as_chunkskonst::slice::as_rchunkskonst::slice::bytes_trim_end: replaced by <[u8]>::trim_ascii_endkonst::slice::bytes_trim_start: replaced by <[u8]>::trim_ascii_startkonst::slice::bytes_trim: replaced by <[u8]>::trim_asciikonst::slice::first_mutkonst::slice::last_mutkonst::slice::split_first_mutkonst::slice::split_last_mutkonst::string::from_utf8konst::string::is_char_boundarystring::trim_end: replaced by str::trim_ascii_endstring::trim_start: replaced by str::trim_ascii_startstring::trim: replaced by str::trim_ascii(the items in the list above without an explicit reason were replaced by a method or function of the same name)
Removed these items because their unstable std equivalents were removed:
konst::slice::array_chunkskonst::slice::array_chunks_mutkonst::slice::ArrayChunkskonst::slice::ArrayChunksRevkonst::slice::ArrayChunksMutkonst::slice::ArrayChunksMutRevRemoved these functions due to having an unsound impl:
konst::ptr::is_nullkonst::ptr::nonnull::newRemoved these items because they are not needed anymore:
konst::rebind_if_ok macrokonst::try_rebind macrokonst::polymorphism::type_eq_projection_fn macro: replaced by typewit::TypeFn+TypeEq::projectkonst::unwrap_ctx macro: superceeded by konst::result::unwrappanic methods: superceeded by const_panic::PanicFmt implskonst::parsing::ParserResult: using the type it aliased instead of the aliaskonst::parsing::ParseValueResult: using the type it aliased instead of the aliaskonst::cmp::ConstCmpUnref: replaced by ConstCmp::This associated typeConstrained macros that take closures from taking functions through :expr to :path, to keep the evaluation order of macros consistent with functions.
Added these macros at the root module:
if_let_Somewhile_let_SomeAdded konst::drop_flavor module with these items:
DropFlavor traitDropFlavorWrapper traitMayDrop marker typeNonDrop marker typeunwrap functionas_inner functionas_inner_mut functionwrap functionRenameed konst::array::{map_, from_fn_} macros to map and from_fn respectively, replacing the old macros of the same name in the process.
Changes to konst::array::ArrayConsumer:
IntoIterConstIntoIter for itnext* methods to return Option<T> instead of Option<ManuallyDrop<T>> (to be consistent with ConstIntoIter API).D: DropFlavor parameter to konst::array::IntoIter to make it sometimes not need droppingnew constructor with new of_copy and of_drop constructors.into_copy methodinto_drop methodrev methodChanges to konst::array::ArrayBuilder
D: DropFlavor type parameter to make it sometimes not need dropping.new constructor with new of_copy and of_drop constructors.is_empty methodinto_copy methodinto_drop methodChange: Made array items conditional on "iter" feature:
konst::array::ArrayBuilderkonst::array::from_fnkonst::array::IntoIterkonst::array::IntoIterRevkonst::array::mapAdded ConstIntoIter impl for arrays that uses konst::array::IntoIter<T, L, MayDrop> as the iterator.
Added konst::array::IntoIterRev iterator.
Added these items for ConstCmp overhaul;
konst::cmp::ConstCmp::This associated typekonst::cmp::ConstCmpKind traitkonst::cmp::CoerceTo type aliasRemoved IsRefKind reexport from konst::cmp and made it not a valid ConstCmp::Kind
Merged all inherent coerce methods of IsAConstCmp into one generic method.
Replaced CmpWrapper::slice constructor with from_ref, which takes any &T and converts it into &CmpWrapper<T>.
Changed the precise type that std types are coerced into for having const_eq and const_cmp methods:
&[T; N] to CmpWrapper<&[T]>, it's converted to &CmpWrapper<[T; N]>&[T] to CmpWrapper<&[T]>, it's converted to &<[T]>&str to CmpWrapper<&str>, it's converted to &str&T to CmpWrapper<T>, it's converted to &CmpWrapper<T>Moved these macros to konst::cmp module:
coerce_to_cmpconst_cmpconst_cmp_forconst_eqconst_eq_forimpl_cmpmaxmax_bymax_by_keyminmin_bymin_by_keytry_equalChanged konst::cmp::{const_cmp_for, const_eq_for} to borrow their slice arguments
Added these comparison macros:
konst::cmp::const_gekonst::cmp::const_ge_forkonst::cmp::const_gtkonst::cmp::const_gt_forkonst::cmp::const_lekonst::cmp::const_le_forkonst::cmp::const_ltkonst::cmp::const_lt_forkonst::cmp::const_nekonst::cmp::const_ne_forFixed how const_cmp_for macro and const_cmp methods compared slices for ordering, they used to consider all slices less than all longer slices. Now const_cmp!(short_slice, longer_slice) only returns Less if all elements of short_slice are less than or equal to the longer_slice elements at the same index.
Turned iterators from taking Self and returning Option<(Self::Item, Self)> into taking &mut Self and returning Option<Self::Item>.
Removed support for lifetime promotion in return value of iterator methods in iterator macros, i.e.: there's no guarantee that the returned reference be usable in the following methods.
Added konst::iter::ConstIntoIter::ITEMS_NEED_DROP associated constant
Added konst::iter::ConstIntoIterKind trait
Added konst::iter::CoerceTo type alias
Added ConstIntoIter impl for &mut impl ConstIntoIter<Kind = IsIteratorKind>, that is for mutable references to iterators.
Added ConstIntoIterKind bound to ConstIntoIter::Kind.
Turned IntoIterWrapper::coerce methods into free function at konst::iter::coerce
Added konst::iter::{repeat_n, RepeatN} iterator constructor and iterator struct.
Removed rposition method from iterator macros, since it returned the distance from the end, not the start (bugfix).
Changed drop behavior for iterators in iter::eval: iterators with ConstIntoIter::ITEMS_NEED_DROP == true are fully consumed after evaluating the methods passed to the macro, after which all iterators are mem::forget-ed.
Changed IntoIterWrapper to only be constructible by konst::iter::coerce, and made its fields private.
Fixed rev method of iterator macros: it can't be used if enumerate/take/take_while/skip/skip_while/zip were used before it, because the iterator without this restriction would produce different results than std::iter::Iterator would.
Added these methods to iter::eval macro (conditional on "cmp" feature):
cmpeqgegtis_sorted_by_keyis_sorted_byis_sortedleltmax_by_keymax_bymaxmin_by_keymin_byminneChanged all of the konst::parsing::Parser methods to use &mut self instead of taking and returning Parser by value, now every method mutates the Parser in place instead of returning a new Parser each time.
The signatures of konst::parsing::Parser methods were changed in this way:
(self) -> Self methods: changed into (&mut self) -> &mut Self(self, ..) -> Result<(T, Self), E> methods: changed into (&mut self, ..) -> Result<T, E>.(self, ..) -> Result<Self, E> methods: changed into (&mut self, ..) -> Result<&mut Self, E>.Removed Copy impl for Parser, added copy method for explicit copying.
Renamed Parser::into_error to to_error and changed it from taking self to taking &self
Renamed Parser::into_other_error into to_other_error, and from taking self to &self.
Changed ParseError::new to take Parser by reference.
Changed ParseError::other_error to take Parser by reference.
Changed signature of ParseError::extra_message from returning &str to &'static str (the former tied the lifetime parameter of &str to the lifetime of the ParseError value)
Renamed parse_with to parse_type and moved to konst::parsing
Moved parser_method to konst::parsing
Changed the parse_type macro from taking konst::parsing::Parser to automatically mutably borrowing it.
Added const_panic::PanicFmt impls (used by konst::result::unwrap) for:
konst::parsing::ErrorKindkonst::parsing::ParseErrorkonst::parsing::ParseDirectionkonst::primiive::ParseBoolErrorkonst::slice::TryIntoArrayErrorChanged Option macros to require Option by value when the equivalent methods takes Option by value (the macros used to allow passing Option by reference)
Added const equivalents of Option-related items:
konst::option::get_or_insert_with (macro)konst::option::get_or_insert (macro)konst::option::insert (macro)konst::option::into_iter (function, iterator constructor)konst::option::IntoIter (struct, iterator)konst::option::IntoIterRev (struct, iterator)konst::option::is_none_or (macro)konst::option::is_some_and (macro)konst::option::iter_mut (function, iterator constructor)konst::option::iter (function, iterator constructor)konst::option::Iter (struct, iterator)konst::option::IterMut (struct, iterator)konst::option::IterMutRev (struct, iterator)konst::option::IterRev (struct, iterator)konst::option::unzip (function)konst::option::zip (macro)Added support for Drop types in some Option macros:
konst::option::and_thenkonst::option::mapkonst::option::ok_or_elsekonst::option::or_elsekonst::option::unwrap_or_elseAdded ConstIntoIter impls for Option<T>/&Option<T>/&mut Option<T>
Added missing impls of ConstCmp for Range and RangeInclusive types over signed integers.
Added konst::range::OneSidedRange trait (currently only used by konst::slice::{split_off, split_off_mut})
Added these items to konst::slice:
konst::slice::chunks_exact_mut (function, iterator constructor)konst::slice::chunks_mut (function, iterator constructor)konst::slice::ChunksExactMut (struct, iterator)konst::slice::ChunksExactMutRev (struct, iterator)konst::slice::ChunksMut (struct, iterator)konst::slice::ChunksMutRev (struct, iterator)konst::slice::fill_with (macro)konst::slice::fill (function)konst::slice::is_sorted_by_key (macro)konst::slice::is_sorted_by (macro)konst::slice::is_sorted (macro)konst::slice::iter_mut (function, iterator constructor)konst::slice::IterMut (struct, iterator)konst::slice::IterMutRev (struct, iterator)konst::slice::rchunks_exact_mut (function, iterator constructor)konst::slice::rchunks_mut (function, iterator constructor)konst::slice::RChunksExactMut (struct, iterator)konst::slice::RChunksExactMutRev (struct, iterator)konst::slice::RChunksMut (struct, iterator)konst::slice::RChunksMutRev (struct, iterator)konst::slice::split_off_first_mut (function)konst::slice::split_off_first (function)konst::slice::split_off_last_mut (function)konst::slice::split_off_last (function)konst::slice::split_off_mut (function)konst::slice::split_off (function)Fixed RSplitTerminator: it used to skip the empty string before the first instance of the delimiter, instead of the empty space after the last one.
The latter is what RSplitTerminator does now, to be consistent with std.
Removed .rev() method of konst::string::{Split, RSplit}, because it allowed reversing an iterator with a &str needle, when std does not allow it (because the reverse iterator would produce different strings than forward).
Reexported const_panic::unwrap_ok as konst::result::unwrap
Changed Result macros to require passing Result by value whenever the equivalent method does.
Changed konst's edition to 2024 and Minimum Supported Rust Version to 1.89.0.
Added crate features:
"const_panic_derive": to enable const_panic's "derive" feature.Removed these crate features since the features they enabled are now always enabled:
"rust_1_83""mut_refs""nightly_mut_refs"Upgraded const_panic dependency to 0.2.13, enabled its "rust_1_88" feature
Upgraded typewit dependency to 1.12, disabled its default feature, and enabled its "rust_1_83" feature.
Fixed compilation error in konst::ptr module on Rust nightly 2026-04-09.
Fixed compilation error in konst::ptr module on Rust nightly 2026-04-09.
Deprecated these functions due to unsoundness:
Deprecated these functions due to unsoundness:
konst::ptr::is_nullkonst::ptr::nonnull::newThis release enables all &mut -taking const functions in Rust 1.83.0, provides ArrayBuilder / ArrayConsumer array helpers, and the konst::manually_dro
This release enables all &mut-taking const functions in Rust 1.83.0, provides ArrayBuilder/ArrayConsumer array helpers, and the konst::manually_drop::take function.
Soft-removed "mut_refs" and "nightly_mut_refs" feature (by hidding it in docs), changed to using "rust_1_83" feature to enable &mut-taking const fns.
(to avoid breakage, "mut_refs" still enables items that use &mut in const by enabling "rust_latest_stable")
Changed "rust_latest_stable" feature to enable "rust_1_83" feature.
Added konst::manually_drop::take function
Added these structs to konst::array:
ArrayBuilderArrayConsumerFixed accidental inclusion of private macros in docs.
Fixed accidental inclusion of private macros in docs.
Fixed accidental inclusion of private macros in docs.
Nothing published for this version
This release adds closer const equivalents to <[T; N]>::{from_fn, map} , without the limitations of the previous macro equivalents.
This release adds closer const equivalents to <[T; N]>::{from_fn, map}, without the limitations of the previous macro equivalents.
Changed konst::array::from_fn macro to allow unparenthesized type to the left of the `=>
Added these macros in konst::array (which require the "rust_1_83" feature):
map_from_fn_Nothing published for this version
This release adds a destructure macro to destructure (non-Drop) structs/tuples/arrays into their potentially fields/elements in const. This macro requ
This release adds a destructure macro to destructure (non-Drop) structs/tuples/arrays into their potentially fields/elements in const.
This macro requires the 1.83.0 Rust release, which will reach the stable channel on 2024-11-28.
Added "rust_1_83" feature, which enables the "mut_refs" feature.
Added "destructure" macro (requires the "rust_1_83" feature)
Fixed future compatibility warnings
Defined these macros max, max_by, max_by_key, min, min_by, and min_by_key macros.
Re-exported these macros in the konst::cmp module:
coerce_to_cmpconst_cmpconst_cmp_forconst_eqconst_eq_forimpl_cmpmaxmax_bymax_by_keyminmin_bymin_by_keyNow the fold and foldr methods in konst::iter::eval can take closures with type-annotated parameters (e.g: |accum: Bar, element: Qux| {)
Removed most Copy restriction of these macros:
konst::array::from_fnkonst::array::mapkonst::iter::collect_constkonst::array::map is still required not to move out of the input array.Improved konst::array::{from_fn, map} macros by allowing its closure parameter to take more unparenthesized patterns.
Improved the konst::iter::{collect_const, eval, for_each} macros by allowing single-parameter closures passed to the macro to annotate the type of the parameter.
Defined these macros max, max_by, max_by_key, min, min_by, and min_by_key macros.
Defined these macros max, max_by, max_by_key, min, min_by, and min_by_key macros.
Re-exported these macros in the konst::cmp module:
coerce_to_cmpconst_cmpconst_cmp_forconst_eqconst_eq_forimpl_cmpmaxmax_bymax_by_keyminmin_bymin_by_keyNow the fold and foldr methods in konst::iter::eval can take closures with type-annotated parameters (e.g: |accum: Bar, element: Qux| {)
Removed most Copy restriction of these macros:
Removed most Copy restriction of these macros:
konst::array::from_fnkonst::array::mapkonst::iter::collect_const
The pattern of the closure passed to konst::array::map is still required not to move out of the input array.Improved konst::array::{from_fn, map} macros by allowing its closure parameter to take more unparenthesized patterns.
Improved the konst::iter::{collect_const, eval, for_each} macros by allowing single-parameter closures passed to the macro to annotate the type of the parameter.
The 0.3.7 release adds a few chunky slice functions, and fixes an iterator method.
The 0.3.7 release adds a few chunky slice functions, and fixes an iterator method.
Fixed ChunksExact::remainder's implementation, it used to return the entire uniterated-over slice, when it should only return the part of the slice that the iterator never yields.
Added these items to konst::slice module:
ArrayChunksRev structArrayChunks structRChunksExactRev structRChunksExact structRChunksRev structRChunks structarray_chunks functionas_chunks functionas_rchunks functionrchunks_exact functionrchunks functionChanged type_eq_projection_fn macro to not use any unsafe, this may require fixing bounds in your code.
Added typewit = "1.1" dependency.
Removed konst::docs module.
Replaced konst::polymorphism::{HasTypeWitness,MakeTypeWitness,TypeWitnessTypeArg,TypeEq} from the same-named items in typewit
Added reexport of typewit::{self, CallFn, simple_type_witness,TypeFn,type_fn} in konst::polymorphism
Fixed Parser::parse_direction's const-ness by making it a const fn.
Changed type_eq_projection_fn macro to not use any unsafe, this may require fixing bounds in your code.
Changed type_eq_projection_fn macro to not use any unsafe, this may require fixing bounds in your code.
Added typewit = "1.1" dependency.
Added typewit = "1.1" dependency.
Removed konst::docs module.
Replaced konst::polymorphism::{HasTypeWitness,MakeTypeWitness,TypeWitnessTypeArg,TypeEq} from the same-named items in typewit
Added reexport of typewit::{self, CallFn, simple_type_witness,TypeFn,type_fn} in konst::polymorphism
Fixed Parser::parse_direction's const-ness by making it a const fn.
Fixed Parser::parse_direction's const-ness by making it a const fn.
Nothing published for this version
Nothing published for this version
Nothing published for this version
This release does many API cleanups and additions by using language features from the newest stable releases.
This release does many API cleanups and additions by using language features from the newest stable releases.
Removed konst::array::try_into_array macro (it's superceeded by the function of the same name)
Removed these functions because the std equivalent is stably const:
konst::maybe_uninit::{as_ptr, assume_init, assume_init_ref}konst::ptr::{deref, deref_mut}konst::slice::{first, last, split_first, split_last}Removed extra from parameter of:
konst::slice::{bytes_contain, bytes_rcontain, bytes_find, bytes_rfind}konst::string::{find, contains, rfind, rcontains}Added these items in konst::polymorphism:
HasTypeWitness(trait)MakeTypeWitness(trait)TypeEq(struct)TypeWitnessTypeArg(trait)type_eq_projection_fn(macro)Added konst::docs::type_witnesses documentation module.
Added konst::chr module, with these items:
Utf8Encodedencode_utf8from_u32_uncheckedfrom_u32Renamed IntoIterKind to ConstIntoIter.
Added Item and IntoIter assoc types to ConstIntoIter, and added checks in iterator macros that Item matches the item's type.
Moved comparison-related from konst::polymorphism to new konst::cmp module.
Renamed ConstCmpMarker to ConstCmp.
Renamed these marker types:
IsAConstCmpMarker to IsAConstCmpIsIntoIterKind to IsConstIntoIterIsNonIteratorKind to IsIntoIterKind (not to be confused with the previous name for the trait ConstIntoIter trait)Removed konst::polymorphism::IsArrayKind
Added konst::polymorphism::IsRefKind
Added konst::cmp::ConstCmpUnref traits.
Moved all Is*Kind field-less structs to konst::polymorphism::kinds, made them all 0-variant enums, and reexported the relevant items in konst::cmp and konst::iter.
Removed ConstCmp::This associated type, now it's derived with ConstCmpUnref.
Added konst::slice::BytesPattern trait, implemented for char, [u8], [u8; N], and str.
Made the second parameter of konst::slice::bytes_* functions take a generic BytesPattern.
Added konst::string::Pattern trait, implemented for char and &str
Made string functions take P: Pattern<'s> as the pattern argument.
Added const_panic = "0.2" depdendency to konst
Made all panicking code use const_panic to have the same error messages as at runtime (previously use array indexing hack to panic).
Added konst::array::from_fn macro.
Added konst::iter::{repeat, Repeat}.
Added iteration over ranges of non-usize integers and char.
Added konst::iter::Step trait.
Added konst::ffi::cstr module.
Reexporting konst::iter::step::Step in konst::iter
Added these konst::string items:
Chars(struct)RChars(struct)CharIndices(struct)RCharIndices(struct)char_indices(function)chars(function)from_iter(macro)is_char_boundary(function)str_concat(macro)str_join(macro)Rewrote Parser to only support parsing &str.
Added Parser::{skip, skip_back} methods
Removed these parser functions:
Parser::*_bParser::*_u8 (except for parse_u8)Parser::advance_*Parser::from_bytesRenamed these Parser functions:
from_str to new.bytes to remainder (and takes &str)Added these Parser methods:
into_other_errorrsplit_terminatorrsplitsplit_keepsplit_terminatorsplitskipskip_backtrimtrim_matcheswith_start_offsetAdded ParseError::other_error function for constructing Other errors with custom error messages.
Added FromBoth variant to konst::parser::ParseDirection
Renamed ParserFor trait to HasParser
Added SplitExhausted,DelimiterNotFound variants to konst::parsing::ErrorKind
Removed map_err capability of try_rebind due to being untested and unused.
Removed unwrap_opt_or and unwrap_res_or macros (they are superceeded by other macros).
Made array::map and iterator-taking macros support specifying an explicit return type.
Added assertc_eq, assertc_ne macros.
Added type annotation support to rebind_if_ok macro (for the pattern as a whole).
Fixed support for continue and break inside of konst::for_range.
Changed Parser methods from taking &str patterns to taking any P: Pattern<'p>
Renamed parse_any macro to parser_method
Removed konst::primitive::parse_*_b functions
Renamed "parsing" feature to "parsing_proc" and "parsing_no_proc" feature to "parsing"
Added "iter" feature(enabled by default), feature-gating all iterator-related items.
Added "debug" feature for additional safety checks in konst unsafe code.
Made konst crate 2021 edition, resolver="2".
Bumped minimum supported Rust versions to 1.65.0
Removed all "rust_1_*" features, and all old-version-dependent code.
Renamed konst_macro_rules to konst_kernel crate, which defines items for reexporting in konst (mostly needed for having macros in submodules).
Fixed compilation error in konst::ptr module on Rust nightly 2026-04-09.
Fixed compilation error in konst::ptr module on Rust nightly 2026-04-09.
Addeded konst::iter module, with const encodings of Iterator API:
Addeded konst::iter module, with const encodings of Iterator API:
konst::iter::collect_const (macro)konst::iter::eval (macro)konst::iter::for_each (macro)konst::iter::into_iter (macro)konst::iter::iterator_dsl (documentation module)konst::iter::IntoIterWrapper (struct)konst::iter::IsIntoIterKind (struct)konst::iter::IsIteratorKind (struct)konst::iter::IsNonIteratorKind (struct)konst::iter::IsStdKind (struct)konst::iter::IntoIterKind(trait)Added these const fn (enabled by the "rust_1_64" feature):
konst::string::splitkonst::string::rsplitkonst::string::split_terminatorkonst::string::rsplit_terminatorkonst::string::split_oncekonst::string::rsplit_onceAdded these const string iterators (enabled by the "rust_1_64" feature):
konst::string::Splitkonst::string::RSplitkonst::string::SplitTerminatorkonst::string::RSplitTerminatorAdded these slice functions:
konst::slice::chunks(requires the "rust_1_64" feature)konst::slice::chunks_exact(requires the "rust_1_64" feature)konst::slice::iterkonst::slice::iter_copied(requires the "rust_1_61" feature)konst::slice::windows (requires the "rust_1_64" feature)Added these slice iterator types:
konst::slice::Chunks (requires the "rust_1_64" feature)konst::slice::ChunksRev (requires the "rust_1_64" feature)konst::slice::ChunksExact (requires the "rust_1_64" feature)konst::slice::ChunksExactRev (requires the "rust_1_64" feature)konst::slice::Iterkonst::slice::IterRevkonst::slice::IterCopied (requires the "rust_1_61" feature)konst::slice::IterCopiedRev (requires the "rust_1_61" feature)konst::slice::Windows (requires the "rust_1_64" feature)konst::slice::WindowsRev (requires the "rust_1_64" feature)Added range iterator types:
konst::range::RangeIterkonst::range::RangeIterRevkonst::range::RangeInclusiveIterkonst::range::RangeInclusiveIterRevkonst::range::RangeFromIterAdded konst::option::copied function (requires the "rust_1_61" feature)
Added "rust_1_51" feature, made "const_generics" feature delegate to it.
Added "rust_1_57" feature, which enables the "rust_1_56" feature.
Added "rust_1_61" feature, which enables the "rust_1_57" feature.
Changed "rust_1_64" feature: now it enables "rust_1_61" feature.
Added "rust_latest_stable" feature that enables the latest "rust_*" feature.
Nothing published for this version
Nothing published for this version
Added "rust_1_64" crate feature, to make slice indexing take constant time from Rust 1.64.0 onwards.
Added "rust_1_64" crate feature, to make slice indexing take constant time from Rust 1.64.0 onwards.
Changed "constant_time_slice" to enable "rust_1_64" feature.
Nothing published for this version
Made "deref_raw_in_fn" feature only require Rust 1.56.0 by stopping the use of an (already stabilized) nightly feature flag.
Made "deref_raw_in_fn" feature only require Rust 1.56.0 by stopping the use of an (already stabilized) nightly feature flag.
konst::manually_drop::as_inner (requires the "rust_1_56" feature).
Added these functions:
konst::manually_drop::as_inner (requires the "rust_1_56" feature).konst::manually_drop::as_inner_mut (requires the "mut_refs" feature).Added these MaybeUninit functions:
konst::maybe_uninit::array_assume_init (requires the "rust_1_56" feature)konst::maybe_uninit::as_mut_ptr (requires the "mut_refs" feature)konst::maybe_uninit::as_ptrkonst::maybe_uninit::assume_init_mut (requires the "mut_refs" feature)konst::maybe_uninit::assume_init_ref (requires the "rust_1_56" feature)konst::maybe_uninit::assume_init (requires the "rust_1_56" feature)konst::maybe_uninit::uninit_array (requires the "rust_1_56" feature)konst::maybe_uninit::write (requires the "mut_refs" feature)Added these raw pointer/NonNull functins:
konst::ptr::as_mut (requires the "mut_refs" feature)konst::ptr::as_ref (requires the "rust_1_56" feature)konst::ptr::deref_mut (requires the "mut_refs" feature)konst::ptr::deref (requires the "rust_1_56" feature)konst::ptr::is_null (requires the "rust_1_56" feature)konst::ptr::non_null::as_mut (requires the "mut_refs" feature)konst::ptr::non_null::as_ref (requires the "rust_1_56" feature)konst::ptr::non_null::from_mut (requires the "mut_refs" feature)konst::ptr::non_null::from_refkonst::ptr::non_null::new (requires the "rust_1_56" feature)Added konst::map, which requires the rust_1_56 feature.
Added konst::array::map, which requires the rust_1_56 feature.
Nothing published for this version
Renamed these functions, reexported with old name, and deprecated the reexport:
Added "rust_1_55" and "rust_1_56" features.
Change: functions that required the "deref_raw_in_fn" feature can be used on Rust 1.56.0 (whenever that reaches stable) with the "rust_1_56" feature.
Added these slice functions
konst::slice::bytes_find_keepkonst::slice::bytes_find_skipkonst::slice::bytes_rfind_keepkonst::slice::bytes_rfind_skipkonst::slice::bytes_trim_end_matcheskonst::slice::bytes_trim_endkonst::slice::bytes_trim_matcheskonst::slice::bytes_trim_start_matcheskonst::slice::bytes_trim_startkonst::slice::bytes_trimkonst::slice::get_from_mut (requires the "mut_refs" feature)konst::slice::get_fromkonst::slice::get_mut (requires the "mut_refs" feature)konst::slice::get_range_mut (requires the "mut_refs" feature)konst::slice::get_rangekonst::slice::get_up_to_mut (requires the "mut_refs" feature)konst::slice::get_up_tokonst::slice::getAdded these str functions, all of which require the "rust_1_55" feature:
konst::string::from_utf8konst::string::get_fromkonst::string::get_rangekonst::string::get_up_tokonst::string::split_atkonst::string::str_fromkonst::string::str_rangekonst::string::strip_prefixkonst::string::strip_suffixkonst::string::str_up_tokonst::string::trimkonst::string::trim_startkonst::string::trim_endkonst::string::trim_matcheskonst::string::trim_start_matcheskonst::string::trim_end_matcheskonst::string::find_skipkonst::string::find_keepkonst::string::rfind_skipkonst::string::rfind_keepRenamed these functions, reexported with old name, and deprecated the reexport:
string::str_starts_with: renamed to string::starts_withstring::str_ends_with: renamed to string::ends_withstring::str_find: renamed to string::findstring::str_contains: renamed to string::containsstring::str_rfind: renamed to string::rfindstring::str_rcontains: renamed to string::rcontainsAdded the konst::string::from_utf8 macro.
Added konst::string::Utf8Error error struct.
Fixed internal soundness bug in where unions weren't #[repr(C))].
Fixed internal soundness bug in where unions weren't #[repr(C))].
Nothing published for this version
Added the "mut_refs", "nightly_mut_refs" features for const fns that take mutable references.
Added the "mut_refs", "nightly_mut_refs" features for const fns that take mutable references.
Added these mutable slice functions:
konst::slice::first_mutkonst::slice::last_mutkonst::slice::slice_from_mutkonst::slice::slice_range_mutkonst::slice::slice_up_to_mutkonst::slice::split_at_mutkonst::slice::split_first_mutkonst::slice::split_last_mutkonst::slice::try_into_array_mutNothing published for this version
Added ParseFor trait and parse_with macro, for type-dispatched parsing.
Added ParseFor trait and parse_with macro, for type-dispatched parsing.
Added StdParser struct as the parser for std types.
Broadened valid syntax for try_rebind/rebind_if_ok
Added trailing comma support to every macros, where applicable
Fixed handling of length argument of slice::try_into_array macro, when the "const_generics" feature is enabled, it would previously require non-trivia
Fixed handling of length argument of slice::try_into_array macro,
when the "const_generics" feature is enabled,
it would previously require non-trivial expressions to be wrapped in braces.
Added the slice::try_into_array macro and nightly function to try to convert &[T] to &[T; N]
Added the slice::try_into_array macro and nightly function to try to convert &[T] to &[T; N]
Defined the slice::TryIntoArrayError as the error type for slice::try_into_array
Added slice::{first, last, split_first, split_last} functions, const equivalents of the slice methods.
Added these (generic) constants, which can be used in [CONST; LEN] even for non-Copy types:
option::NONE: alias for Nonealloc_type::COW_STR_NEW: An empty Cow<'_, str<alloc_type::COW_SLICE_NEW: An empty Cow<'_, [T]>alloc_type::STRING_NEW: An empty Stringalloc_type::VEC_NEW}: An empty Vec<T>maybe_uninit::UNINIT: An uninit MaybeUninit<T>maybe_uninit::UNINIT_ARRAY: An uninit [MaybeUninit<T>; LEN]Added "deref_raw_in_fn" feature to enable const fns that need to dereference raw pointers, requires the nightly compiler.
Added "alloc" feature to enable the alloc_type module.
Nothing published for this version
Deprecated the unwrap_opt_or, and unwrap_res_or macros.
Defined the konst_macro_rules crate 0.2.0, to reexport macros in konst submodules.
Added macro equivalents of Option::{and_then, filter, map, ok_or, ok_or_else, or_else, unwrap_or, unwrap_or_else, flatten} in the konst::option module.
Added macro equivalents of Result::{unwrap_ctx, unwrap_or, unwrap_or_else, ok, err, map, map_err, and_then, or_else} in the konst::result module.
Deprecated the unwrap_opt_or, and unwrap_res_or macros.
Defined result::unwrap_err_or_else macro for convenience.
Added try_ and try_opt macros
Added primitive::parse_* functions, to parse all integer types and bool from &str or &[u8].
Added Parser::parse_ methods for the remaining integer types (u8, u16, u32, i8, i16, i32)
Added "parsing_no_proc" cargo feature, to enable all parser items except for those that require using the konst_proc_macro crate.
Fixed eq_bytes and cmp_bytes doc examples
Fixed the lack of indicators that the rebind_if_ok and try_rebind macros require the "parsing_no_proc" feature.
Breaking change: tightened the syntax of the parse_any macro, now it requires the last branch in the match-like syntax to be _ => , forbidding _ patte…
Breaking change: tightened the syntax of the parse_any macro, now it requires the last branch in the match-like syntax to be _ => <expression>, forbidding _ patterns in other branches.
Added support for these Parser methods in parse_any:
find_skip - rfind_skip - trim_start_matches - trim_end_matchesMoved these functions from slice::cmp to slice, and reexported back in slice::cmp:
cmp_slice_u8: renamed to cmp_byteseq_slice_u8: renamed to eq_bytescmp_option_slice_u8: renamed to cmp_option_byteseq_option_slice_u8: renamed to eq_option_bytes
The above *_bytes functions do not require any cargo features to use.Added comparison functions for &[usize], &[isize], Option<&[usize]>, Option<&[isize]>
Nothing published for this version
Defined the konst_proc_macros crate 0.1.0, for internal use by konst.
Defined the konst_proc_macros crate 0.1.0, for internal use by konst.
Defined equality and ordering comparison functions for:
All the primitive types, including integers, bool, char, and Options of them,
inside the primitives::cmp module.
Ranges and RangeInclusives of all unsigned integer types, inside the range::cmp module.
All the NonZero* types, and Option<NonZero*> types, inside the nonzero::cmp module.
&str and Option<&str>, inside the string module.
Ordering, Option<Ordering>, PhantomData<T>, PhantomPinned, inside the other::cmp module.
Slices of integers, &[bool], &[char], &[&str], &[&[u8]], and Options of them, inside the slice::cmp module.
Defined the polymorphism module, to do type-based overloading, currently limited to const_eq and const_cmp methods.
Defined these items in the polymorphism module:
CmpWrapper: Wrapper type which implements many methods for std types, currently only const_eq and const_cmp.
ConstCmpMarker: Trait for describing whether a type is from the standard library, and has const_eq and/or const_cmp methods.
IsAConstCmpMarker: Helper type used to automatically coerce standard library types into CmpWrapper, and leaving non-std ones unwrapped.
IsArrayKind, IsNotStdKind, IsStdKind: for describing the kind of type something is.
Declared these functions in the slice module:
bytes_contain, bytes_end_with , bytes_find , bytes_rcontain , bytes_rfind , bytes_start_with, bytes_strip_prefix , bytes_strip_suffix , slice_from , slice_range , slice_up_to , split_at.
Declared these functions in the string module:
str_contains, str_ends_with, str_find, str_rcontains, str_rfind, str_starts_with
Declared the parsing module with:
Parser: A parser constructible from &[u8] or &str.
ParseError: The error type returned by fallible Parser methods.
ErrorKind: Enum for the kinds of parsing errors that happened, included inside ParseError
ParseDirection: Enum for the direction a parser is currently parsing from, either the end or the start.
ParseValueResult: Type alias for the Result types that Parser returns when parsing types.
ParserResult: Type alias for Result<'a, Parser, ParseError>
Reexporting these types in the root module:
parsing::{Parser}
string::{cmp_str, eq_str, cmp_option_str, eq_option_str},
Declared these macros:
coerce_to_cmp: For coercing values to types with const_eq or const_cmp methods.
const_cmp, const_cmp_for, const_eq, const_eq_for: for comparing values
for_range: for iterating over a range.
impl_cmp: For implementing ConstCmpMarker for multiple types, and declaring const_eq/const_cmp.
konst: For emulating inline const (const{ }).
parse_any: For calling Parser methods with multiple alternative string literal patterns.
rebind_if_ok: if let Ok which rebinds variables instead of shadowing them.
try_equal: For returning early when an ordering isn't Ordering::Equal
try_rebind: For returning early on Err, rebinding variables on Ok.
unwrap_ctx: Unwraps a Result, calling .panic() on the error value on error.
unwrap_opt_or: Const-equivalent of Option::unwrap_or and Option::unwrap_or_else.
unwrap_res_or: Const-equivalent of Result::unwrap_or and Result::unwrap_or_else.
Defined these cargo features:
"cmp"(enabled by default): Enables all the comparison functions and macros.
"parsing"(enabled by default): Enables the parsing module, macros, and compiles the konst_proc_macros crate.
"constant_time_slice": Improves the performance of certain slice functions from taking linear time to constant time. Requires Rust nightly.
"const_generics": Enables impls that use const generics, instead of being implemented for small arrays. Requires Rust 1.51.0 .
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →