NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3926 most downloaded on crates.io
Foundational const functionality shared between konst and const_panic
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 9 of 10 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
10 releases · first in 2022
One column per quarter.
This 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.
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_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.
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.
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).
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →