PackageTrack
Sign in Get early access

evalexpr

A powerful arithmetic and boolean expression evaluator

13.1.0 9.5M downloads/mo #3186 most downloaded on crates.io ISibboI/evalexpr

What this package is like to depend on

Last release 9 months ago

26 Nov 2025

Ships unpredictably

gaps range from 2 weeks to 10 months

Nearly every release is documented

notes for 46 of 48 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

64 releases · first in 2019

3 releases in the last 12 months

see the full history below

Release timeline

64 releases · Mar 2019 to Nov 2025
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 64
  1. 13.1.0 26 Nov 2025
    Release notes

    chore: Release evalexpr version 13.1.0

    Open source →
    Release notes

    Added

    • Parse integers prefixed with 0b as binary and 0o as octal (#194)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  2. 13.0.0 29 Oct 2025
    Release notes

    chore: Release evalexpr version 13.0.0

    Open source →
    Release notes

    Added

    • Function remove_value to HashMapContext (#189)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  3. 12.0.3 24 Oct 2025
    Release notes

    Fixed

    • Add serde support to DefaultNumericTypes (#185)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  4. 12.0.2 27 Dec 2024
    Release notes

    Fixed

    • Link to ron format in documentation (#177)
    • Use the correct Value construction functions in documentation (#178)
    • Add hint about new licensing also to notes for contributors.
    • Fixed copy-paste error with the Comments section in documentation.

    Contributors

    My warmhearted thanks goes to:

    Open source →
  5. 12.0.1 25 Oct 2024
    Release notes

    Fixed

    • Fixed the math_consts_context! macro that was broken by in 12.0.0 (#173)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  6. 12.0.0 17 Oct 2024
    Release notes

    Changed

    • evalexpr is now licensed under the GNU Affero General Public License Version 3
    • Made the int and float types generic.
    Open source →
  7. 11.3.1 13 Oct 2024
    Release notes

    Fixed

    • str::from does not add double quotes around strings anymore, except if those are inside a tuple (#169)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  8. 11.3.0 09 Dec 2023
    Release notes

    Added

    • Builtin function str::substring (#158)

    Changed

    • The error type WrongFunctionArgumentAmount now expects a range of argument amounts instead of a single one (#159)

    Fixed

    • Minor error in README.
    • Regex functions do not silently ignore superfluous arguments anymore.

    Contributors

    My warmhearted thanks goes to:

    Open source →
  9. 11.2.0 17 Nov 2023
    Release notes

    Added

    • Functions clear, clear_variables and clear_functions to HashMapContext (#156)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  10. 11.1.0 19 Aug 2023
    Release notes

    Added

    • C-style comments (#148)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  11. 11.0.1 26 Jul 2023
    Release notes

    Notes

    This should have been a minor release instead of a patch.

    Added

    • Methods to mutably iterate over operators (Node::iter_operators_mut) and all types of identifiers (Node::iter_identifiers_mut, Node::iter_*_identifiers_mut) (#136)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  12. 11.0.0 01 Jun 2023
    Release notes

    Notes

    • Due to the introduction of GATs, the MSRV changes to 1.65.0 in this update.

    Added

    • Builtin function math::abs (#130)
    • A CLI for evaluating expressions. Install via cargo install evalexpr. (#133)
    • The ability to parse integers from hex literals (#131)

    Changed

    • The IterVariablesContext from using a lifetime parameter to GATs (#135)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  13. 10.0.0 21 May 2023
    Release notes

    Added

    • Builtin functions can now be disabled (#129)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  14. 9.1.0 16 May 2023
    Release notes

    Added

    • Builtin functions contains and contains_any (#127)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  15. 9.0.0 13 Apr 2023
    Release notes

    Fixed

    • Taking numbers to negative powers gave unexpected results (#120)
    • Update MSRV to 1.56.1 (2021 edition release) to allow builds with the latest versions of all dependencies.

    Contributors

    My warmhearted thanks goes to:

    Open source →
  16. 8.2.0 13 Apr 2023
    Release notes

    Added

    • EvalExprError now derives Clone (#116)

    Changed

    • Occurrences of f64 and i64 have been replaced with the type aliases FloatType and IntType where applicable (#113)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  17. 8.1.0 22 Jul 2022
    Release notes

    Added

    • Get all variables or variable/value pairs in a context via a new trait IterateVariablesContext (#108)
    • Functions iter_(read/write)_variable_identifiers, which iterate over all ReadVariableIdentifiers or all WriteVariableIdentifiers in an operator tree (#110)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  18. 8.0.0 06 Jul 2022
    Release notes

    Added

    • Builtin functions to check for nan, infinity and subnormality in floats (#101)
    • Builtin random function (#102)
    • Implement TryFrom<Value> for all types a value can hold (#105)
    • Split VariableIdentifier node into read and write variants (#106)

    Contributors

    My warmhearted thanks goes to:

    Open source →
  19. 7.2.0 16 Mar 2022
    Release notes

    Added

    • The builtin function if, which mimics the if-else construct existing in many programming languages.

    Contributors

    My warmhearted thanks goes to:

    Open source →
  20. 7.1.1 14 Mar 2022
    Release notes

    Fixed

    • Set regex minimum version to 1.5.5, as the previous versions contains a security vulnerability. See https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw?pli=1. This vulnerability does not affect this crate as of now, but if we ever allow passing parameters to the regex engine, it might.
    Open source →
  21. 7.1.0 13 Mar 2022
    Release notes

    Added

    • Bit shift functions shl and shr, same as Rust's shift functions on i64.

    Contributors

    My warmhearted thanks goes to

    Open source →
  22. 7.0.1 20 Feb 2022
    Release notes

    Changed

    • Updated the optional dependencies, and fixed them to a minimum tested version. For simplicity, I fixed them to the newest version, but since I export none of them, this is luckily not breaking.
    • Updated the dev-dependencies.
    Open source →
  23. 7.0.0 13 Jan 2022
    Release notes

    Changed

    • Made the EvalexprError enum non_exhaustive.

    Fixed

    • Expressions that have dangling parenthese expressions such as 4(5) now produce an error.

    Contributors

    My warmhearted thanks goes to

    Open source →
  24. 6.6.0 13 Oct 2021
    Release notes

    Added

    • Bitwise operators as builtin functions bitand, bitor, bitxor, bitnot (#88)
    • Public immutable and mutable accessor functions to the operator and children of a Node.

    Contributors

    My warmhearted thanks goes to

    Open source →
  25. 6.5.0 16 Aug 2021
    Release notes

    Added

    • Make Function::new able to accept closures (thanks to Jakub Dąbek)

    Contributors

    My warmhearted thanks goes to

    Open source →
  26. 6.4.0 21 Jul 2021
    Release notes

    Notes

    • Minimum supported Rust version (MSRV) increased to 1.46.0
    • Increased test coverage by adding more test and ignoring untestable files

    Added

    • Allow scientific notation in float literals

    Changed

    • Made some functions const. This increased the MSRV

    Fixed

    • eval_number methods returned EvalexprError::ExpectedFloat before, now they correctly return EvalexprError::ExpectedNumber

    Contributors

    My warmhearted thanks goes to

    Open source →
  27. 6.3.0 06 Jul 2021
    Release notes

    Added

    • Implement more builtin math methods

    Contributors

    My warmhearted thanks goes to

    Open source →
  28. 6.2.0 24 Jun 2021
    Release notes

    Notes

    • Increased test coverage

    Added

    • Implemented Clone for HashMapContext

    Contributors

    My warmhearted thanks goes to

    Open source →
  29. 6.1.1 22 Jun 2021
    Release notes

    Fixed

    • Improved syntax of documentation
    Open source →
  30. 6.1.0 02 Jun 2021
    Release notes

    Added

    • Macro math_consts_context adding all of Rust's f64 constants
    • All common math functions implemented by Rust's f64 are now builtin
    • Continuous integration and test coverage report

    Contributors

    My warmhearted thanks goes to

    Open source →
  31. 6.0.0 28 May 2021
    Release notes

    Added

    • #![forbid(unsafe_code)]
    • Made Function derive Clone
    • Ensure that Function implements Send and Sync

    Removed

    • Cargo.lock

    Changed

    • Decomposed Context into Context, ContextWithMutableVariables and ContextWithMutableFunctions
    • Replaced the get_function method of Context with a call_function method

    Contributors

    My warmhearted thanks goes to

    Open source →
  32. 5.1.0 28 May 2021
    Release notes

    Added

    • Make Node cloneable

    Contributors

    My warmhearted thanks goes to

    Open source →
  33. 5.0.5 13 Sep 2019
    Release notes

    Fixed

    • is-it-maintained badges had wrong repository definitions
    • maintenance status was given wrongly
    • move maintenance status to top
    Open source →
  34. 5.0.5-alpha.4 13 Sep 2019 pre-release

    Nothing published for this version

  35. 5.0.5-alpha.3 13 Sep 2019 pre-release

    Nothing published for this version

  36. 5.0.5-alpha.2 13 Sep 2019 pre-release

    Nothing published for this version

  37. 5.0.5-alpha.1 13 Sep 2019 pre-release

    Nothing published for this version

  38. 5.0.4 13 Sep 2019
    Release notes

    Added

    • maintenance badge
    • is-it-maintained badges
    Open source →
  39. 5.0.3 30 Aug 2019
    Release notes

    Fixed

    • The != operator was wrongfully parsed as Token::Eq

    Contributors

    Open source →
  40. 5.0.2 30 Aug 2019
    Release notes

    Changed

    • Removed target.bench.dev-dependencies completely, as they can be just listed under the normal dev-dependencies
    Open source →
  41. 5.0.1 30 Aug 2019
    Release notes

    Fixed

    • Bench dependencies are now dev-dependencies so they are not listed on crates.io as normal dependencies anymore
    Open source →
  42. 5.0.0 30 Aug 2019
    Release notes

    Notes

    Finally, 'Sanity' has been released, including a huge bunch of new features. Notably, and providing a reason for the name of this release, function call and tuple semantics have improved a lot. Functions now always take exactly one argument, but this can then be a tuple. It is now possible to construct tuples of tuples, such that mode complex values can be constructed. As of now there is no way to deconstruct them though.

    A lot has been done on string processing, special thanks for that goes to bittrance. Specifically, under the feature flag regex_support two regex functions for strings are hiding now. Also, the operators + and comparison operators have been fitted to support strings.

    Thanks to lovasoa, we now have a nice macro for context creation.

    Thanks to Atul9, the crate is now Rust 2018 compliant.

    Thanks to mestachs' request, we now have functions to iterate over identifiers within an expression.

    Internally, the structure of the operator tree changed from being &dyn-based to being enum-based. Also, we have benchmarks now to observe performance changes in future releases.

    Added

    • Iterator over all identifiers within an expression, including duplicates
    • Iterators over only variable or only function identifiers within an expression, including duplicates
    • Overload the + operator to concatenate strings
    • Overload <, <=, > and >= for strings using lexical ordering (Note: == and != compare strings as expected)
    • Add len, str::regex_matches, str::regex_replace, str::to_lowercase, str::to_uppercase, str::trim functions for strings
    • Add a macro for more convenient definition of contexts including the direct definition of static contexts
    • Add API for value decomposition
    • Allow using context operations in eval calls without context
    • Operator assignment operators for each binary operation (+=, -=, ...)
    • The Operator enum is now public for better error types
    • Benchmarks for observing performance of future releases

    Removed

    • Function arguments are not decomposed anymore. The function implementation will receive exactly one argument now. This allows the function to be called on a tuple properly.

    Changed

    • Operators are an enum now instead of trait objects
    • Update to Rust 2018
    • Updated dependencies

    Fixed

    • Allow variable assignments in eval calls without context. A HashMapContext is created automatically now.
    • The error string for ExpectedNumber was wrong
    • Operators panicked when adding a number to a string
    • Some documentation was not updated for the 4.x releases

    Contributors

    My warmhearted thanks goes to

    Open source →
  43. 5.0.0-rc.2 30 Aug 2019 pre-release

    Nothing published for this version

  44. 5.0.0-rc.1 29 Aug 2019 pre-release

    Nothing published for this version

  45. 5.0.0-beta.1 29 Aug 2019 pre-release

    Nothing published for this version

  46. 5.0.0-alpha.1 24 Apr 2019 pre-release

    Nothing published for this version

  47. 4.1.0 31 Mar 2019
    Release notes

    Added

    • Export expect_function_argument_amount
    Open source →
  48. 4.0.0 30 Mar 2019
    Release notes

    Added

    • String constants
    Open source →
  49. 3.1.0 28 Mar 2019
    Release notes

    Added

    • Add serde support to HashMapContext
    • Make HashMapContext derive Default and Debug

    Changed

    • Changed name of serde feature flag to serde_support
    Open source →
  50. 3.1.0-rc.2 28 Mar 2019 pre-release

    Nothing published for this version

  51. 3.1.0-rc.1 28 Mar 2019 pre-release

    Nothing published for this version

  52. 3.0.0 28 Mar 2019
    Release notes

    Notes

    The 3.0.0 update transforms the expression evaluator evalexpr to a tiny scripting language. It allows assignments and chaining of expressions. Some changes in this update are breaking, hence the major release.

    Added

    • Methods Node::eval_<type>_with_context_mut and crate level eval_<type>_with_context_mut
    • Empty type and corresponding shortcut methods. The empty type is emitted by empty expressions or empty subexpressions ().
    • The assignment operator =
    • The expression chaining operator ;

    Removed

    • Generic arguments from Context traits are now static to allow using trait objects of Context
    • EvalexprError::EmptyExpression is not required anymore since empty expressions now evaluate to the empty type

    Changed

    • Merge ContextMut trait into Context trait
    Open source →
  53. 3.0.0-rc.2 28 Mar 2019 pre-release

    Nothing published for this version

  54. 3.0.0-rc.1 28 Mar 2019 pre-release

    Nothing published for this version

  55. 2.0.0 28 Mar 2019
    Release notes

    Notes

    The 2.0.0 update is the first step to transform evalexpr to a tiny scripting language with support of at least variable assignment. The main change for now is that Configuration is called Context, which seems to be a more proper naming for a set of variables that can not only be read, but also manipulated via expressions. This update includes further renamings and some inconsistencies in the API were fixed. For more details, see the following subsections.

    Added

    • Add the ContextMut trait, that is a manipulable configuration/context
    • Add ContextNotManipulable error variant for the EmptyContext
    • Make the TupleType alias public
    • Add the ValueType enum that represents the type of a value for easier comparisons and matchings
    • Add EvalexprResult<T> type that uses the EvalexprError type (renamed from Error)
    • Add Node::eval_number and Node::eval_number_with_context to evaluate to int or float and silently converting to float
    • Add eval_number and eval_number_with_context crate methods to evaluate to int or float and silently converting to float

    Changed

    • Get rid of some unwraps to improve safety
    • Rename Error to EvalexprError
    • Rename Configuration to Context
    • Rename HashMapConfiguration to HashMapContext and EmptyConfiguration to EmptyContext
    • Rename Value::as_float to Value::as_number and add new Value::as_float that fails if value is an integer
    Open source →
  56. 2.0.0-rc.1 27 Mar 2019 pre-release

    Nothing published for this version

  57. 1.2.0 23 Mar 2019
    Release notes

    Added

    • Add serde feature
    • Implement serde::de::Deserialize for Node
    • Document serde usage
    • Add custom error type with a String message

    Changed

    • Highlighting in documentation
    Open source →
  58. 1.2.0-rc.1 23 Mar 2019 pre-release

    Nothing published for this version

  59. 1.1.0 20 Mar 2019
    Release notes

    Added

    • Internal aliases IntType and FloatType used by the Value enum are now public
    • Type alias TupleType used to represent tuples was added
    • Error types like Error::ExpectedInt for expecting each value type were added
    • Shortcut functions like eval_int or eval_int_with_configuration to evaluate directly into a value type were added
    • Documentation for the shortcut functions was added
    • Functions to decompose Values were added and documented

    Removed

    • Integration tests were removed from shipped crate

    Fixed

    • Wording of some documentation items was changed to improve readability
    Open source →
  60. 1.1.0-rc.1 20 Mar 2019 pre-release

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive