frunk
Frunk provides developers with a number of functional programming tools like HList, Coproduct, Generic, LabelledGeneric, Validated, Monoid, Semigroup and friends.
0.5.0
11M downloads/mo
#2911 most downloaded on crates.io
lloydmeta/frunk
What this package is like to depend on
Last release 1 months ago
04 Jul 2026
Ships fairly regularly
a new release about every 9 months
Some releases are documented
notes for 14 of 50 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
50 releases · first in 2016
1 release in the last 12 months
see the full history below
Release timeline
50 releases · Oct 2016 to Jul 2026Releases
latest 50-
0.5.004 Jul 2026Release notes
Open source →- Add
Genericsupport for enum representations (https://github.com/lloydmeta/frunk/pull/252)
- Add
-
0.4.414 Jun 2025Release notes
Open source →- Implement Plucker/ByNameFieldPlucker for &HList (https://github.com/lloydmeta/frunk/pull/240)
-
0.4.331 Aug 2024Release notes
Open source →Please see the changelog for details
- #236 , thanks to @mammothbane is the VIP here.
Release notes
Open source →- avoid clippy::unneeded_field_pattern (https://github.com/lloydmeta/frunk/pull/216)
- rework #![no_std] support, switch on alloc (https://github.com/lloydmeta/frunk/pull/236)
-
0.4.217 Jun 2023Release notes
Open source →- Removed
proc-macro-hackmachinery (proc-macros-impl) (https://github.com/lloydmeta/frunk/pull/214) - Add function for explicitly extending an hlist (https://github.com/lloydmeta/frunk/pull/209)
- Removed
-
0.4.103 Nov 2022Release notes
Open source →Lots of good stuff thanks to team work from a number of contributors (incl steffahn, kpp, agluszak, rosefromthedead, and BGR360)
From the Changelog
Release notes
Open source →- Documentation fix for
Hcons::sculpt(https://github.com/lloydmeta/frunk/pull/194) - Optimise Semigroup for HashSet and HashMap (https://github.com/lloydmeta/frunk/pull/196)
- Update to 2021 edition (https://github.com/lloydmeta/frunk/pull/200)
- Add
extractto get value out of 1-type coproduct (https://github.com/lloydmeta/frunk/pull/201) - Fix needless borrow (https://github.com/lloydmeta/frunk/pull/202)
- Add
Coproduct::map(https://github.com/lloydmeta/frunk/pull/204)
- Documentation fix for
-
0.4.025 Jun 2021Release notes
Open source →Lots of good stuff thanks to team work from a number of contributors (incl @mbrobbel, @ImmemorConsultrixContrarie , @ExpHP)
From the Changelog
- [Breaking change] Rename
Hlist!type macro toHList!(#132) - [Breaking change] Remove deprecated
HList.length()(#125) - [Breaking change]
HFoldRightablerework: nowHFoldRightable::foldrdoes not differ fromHFoldLeftable::foldlin calling, likestd::iter::DoubleEndedIterator::rfolddoes not differ fromstd::iter::Iterator::fold. Note: thoughfoldrbehavior wasn't changed, all oldfoldrcalls would either stop compiling or produce wrong results (#171) - [Breaking change] Bump quote, syn and proc-macro2 to 1 (#183)
- Fix unicode identifiers support #186
Release notes
Open source →- [Breaking change] Rename
Hlist!type macro toHList!(https://github.com/lloydmeta/frunk/issues/132) - [Breaking change] Remove deprecated
HList.length()(https://github.com/lloydmeta/frunk/issues/125) - [Breaking change]
HFoldRightablerework: nowHFoldRightable::foldrdoes not differ fromHFoldLeftable::foldlin calling, likestd::iter::DoubleEndedIterator::rfolddoes not differ fromstd::iter::Iterator::fold. Note: thoughfoldrbehavior wasn't changed, all oldfoldrcalls would either stop compiling or produce wrong results (https://github.com/lloydmeta/frunk/issues/171) - [Breaking change] Bump quote, syn and proc-macro2 to 1 (https://github.com/lloydmeta/frunk/pull/183)
- Fix unicode identifiers support https://github.com/lloydmeta/frunk/pull/186
- [Breaking change] Rename
-
0.3.216 Apr 2021Release notes
Open source →- Allow folding hlist with a single Poly (https://github.com/lloydmeta/frunk/pull/170)
-
0.3.121 Dec 2019Release notes
Open source →- Refactoring derives (https://github.com/lloydmeta/frunk/pull/157)
- Add support for deriving LabelledGeneric on enums (https://github.com/lloydmeta/frunk/pull/158)
- Added HZippable (https://github.com/lloydmeta/frunk/pull/160)
- Add a type macro for paths (https://github.com/lloydmeta/frunk/pull/161)
-
0.3.023 Mar 2019Release notes
Open source →Added
- More transmogrifications supported out of the box (https://github.com/lloydmeta/frunk/pull/152)
Box,Option,Vecand more.
- More idiomatic Debug impl for Field Debug impls should use DebugStruct #153
- [no-std] support https://github.com/lloydmeta/frunk/pull/148
- Note: this is a breaking change, see the PR for details
- More transmogrifications supported out of the box (https://github.com/lloydmeta/frunk/pull/152)
-
0.2.409 Feb 2019Release notes
Open source →Added
- Added
ToMuttrait, which allows borrowing mutably from a Coproduct or HList. - Added support for
#[derive(LabelledGeneric)]on tuple structs - Added
Pathmodel andPathTraversertrait, which allows for composable lens-like-usage
Changed
- Make macros call themselves recursively with
$crate::
- Added
-
0.2.221 Oct 2018Release notes
Open source →- Added support for transmogrifying (recursively sculpting) one data type into another
-
0.2.128 Sep 2018 -
0.2.020 Apr 2018Release notes
Open source →Added
- :confetti_ball: Forces joined with new collaborators [@Centril] and [@ExpHP]!
frunknow adheres to semantic versioning!- Inherent method wrappers for many trait methods on HList and Coproduct.
- Re-exports for a variety of essential items at the root level of
frunk. - Module
frunk::preludefor extension traits and similar. - Methods
Coproduct::embedandCoproduct::subset. ...tailargument in each of the HList and Coproduct macros.- The
Functrait, an alternative toFnthat can be implemented on stable. - The
Polywrapper type andpoly_fn!macro, which useFuncto provide order-free mapping. map_reprandmap_internforGeneric, convenience methods for temporarily converting an object into its generic representation or a similar type.
Changed
- A general paradigm shift from per-module glob imports to the more
Rusty model of
usewhat you need. Many of the other changes listed help accomodate this. - Renamed the
with-serdefeature toserde, in line with convention. - Various unnecessary type parameters have been removed or replaced with
associated types. This affects
CoprodInjector,HMappable, andHFold{Left,Right}able. - Moved
hlist::IntoReverseto accompanyFuncin the newtraitsmodule. - Moved
hlist::{Here, There, Suffixed}to a newindicesmodule. - The zero index
Hereis no longer an empty type. We have... plans. :japanese_ogre: - Character types were moved from
labelledtolabelled::chars. - Mapping/folding by reference is now written as
list.to_ref().map(...), where formerlyas_ref()was used. The newto_ref()trait composes orthogonally to many other features of HList and Coproduct, and relieves frunk from providing impls for&HConsthat can be susceptible to the dreaded "Overflow evaluating_: std::marker::Sized" error. - Lots of documentation improvements!
Removed
- The identity
AsRefimpls on HList and Coproduct, which were only present to support the oldas_ref().map(...)pattern.
-
0.1.3625 Feb 2018Release notes
Open source →Features present
Prior to v0.2.0,
frunkdid not keep a detailed changelog, and did not adhere to semver. The following list is a modest attempt to summarize the features of v0.1.36.- The types
HLists andCoproducts, which serve as variadic product and sum types.- Many methods are provided through individual traits.
- The SYB traits
GenericandLabelledGenericfor conversions between similarly-shaped structs.- The
frunk_derivescrate provides#[derive(Generic, LabelledGeneric)].
- The
- The functional traits
SemigroupandMonoid, with a number of implementations.- A number of implementations are provided.
- The
frunk_lawscrate providesquickcheck-compatible predicates for testing custom impls.
- The convenience macros
hlist!,Hlist!,hlist_pat!,field!. - The
Validatedtype, a non-short-circuiting alternative toResult.
- The types
-
0.1.3512 Feb 2018Nothing published for this version
-
0.1.3426 Oct 2017Nothing published for this version
-
0.1.3327 Sep 2017Nothing published for this version
-
0.1.3209 Sep 2017Nothing published for this version
-
0.1.3104 Sep 2017Nothing published for this version
-
0.1.3021 Jun 2017Nothing published for this version
-
0.1.2903 Jun 2017Nothing published for this version
-
0.1.2825 Apr 2017Nothing published for this version
-
0.1.2723 Apr 2017Nothing published for this version
-
0.1.2623 Apr 2017Nothing published for this version
-
0.1.2520 Apr 2017Nothing published for this version
-
0.1.2419 Apr 2017Nothing published for this version
-
0.1.2318 Apr 2017Nothing published for this version
-
0.1.2222 Mar 2017Nothing published for this version
-
0.1.2122 Mar 2017Nothing published for this version
-
0.1.2017 Mar 2017Nothing published for this version
-
0.1.1916 Mar 2017Nothing published for this version
-
0.1.1806 Mar 2017Nothing published for this version
-
0.1.1704 Mar 2017Nothing published for this version
-
0.1.1604 Mar 2017Nothing published for this version
-
0.1.1503 Mar 2017Nothing published for this version
-
0.1.1402 Mar 2017Nothing published for this version
-
0.1.1302 Mar 2017Nothing published for this version
-
0.1.1201 Mar 2017Nothing published for this version
-
0.1.1101 Mar 2017Nothing published for this version
-
0.1.1001 Mar 2017Nothing published for this version
-
0.1.904 Feb 2017Nothing published for this version
-
0.1.803 Feb 2017Nothing published for this version
-
0.1.716 Nov 2016Nothing published for this version
-
0.1.611 Nov 2016Nothing published for this version
-
0.1.511 Nov 2016Nothing published for this version
-
0.1.422 Oct 2016Nothing published for this version
-
0.1.321 Oct 2016Nothing published for this version
-
0.1.221 Oct 2016Nothing published for this version
-
0.1.121 Oct 2016Nothing published for this version
-
0.1.020 Oct 2016Nothing published for this version