All Versions
Latest Version
Avg Release Cycle
54 days
Latest Release

Changelog History
Page 2

  • v1.2.0 Changes

    ๐Ÿ› Bug fixes (potentially script-breaking)

    • As originally intended, function calls with a bang (!) now operates directly on the caller's scope, allowing variables inside the scope to be mutated.
    • As originally intended, Engine::XXX_with_scope API's now properly propagate constants within the provided scope also to functions in the script.
    • ๐Ÿ–จ Printing of integral floating-point numbers is fixed (used to only prints 0.0).
    • func!() calls now work properly under no_closure.
    • ๐Ÿ›  Fixed parsing of unary negation such that expressions like if foo { ... } -x parses correctly.

    ๐Ÿ†• New features

    • ๐Ÿ”Œ #[cfg(...)] attributes can now be put directly on plugin functions or function defined in a plugin module.
    • ๐Ÿ“œ A custom syntax parser can now return a symbol starting with $$ to inform the implementation function which syntax variant was actually parsed.
    • AST::iter_literal_variables is added to extract all top-level literal constant/variable definitions from a script without running it.
    • Engine::call_fn_dynamic is deprecated and Engine::call_fn_raw is added which allows keeping new variables in the custom scope.

    โœจ Enhancements

    • Array methods now avoid cloning as much as possible (although most predicates will involve cloning anyway if passed a closure).
    • Array methods that take function pointers (e.g. closures) now optionally take the function name as a string.
    • Array adds the dedup method.
    • Array adds a sort method with no parameters which sorts homogeneous arrays of built-in comparable types (e.g. INT).
    • Inlining is disabled for error-path functions because errors are exceptional and scripts usually fail completely when an error is encountered.
    • โšก๏ธ The optimize module is completely eliminated under no_optimize, which should yield smaller code size.
    • NativeCallContext::position is added to return the position of the function call.
    • ๐Ÿ‘ฏ Scope::clone_visible is added that copies only the last instance of each variable, omitting all shadowed variables.

    ๐Ÿ—„ Deprecated API's

    • NativeCallContext::call_fn_dynamic_raw is deprecated and NativeCallContext::call_fn_raw is added.
    • ๐Ÿ—„ From<EvalAltResult> for Result<T, Box<EvalAltResult> > is deprecated so it will no longer be possible to do EvalAltResult::ErrorXXXXX.into() to convert to a Result; instead, Err(EvalAltResult:ErrorXXXXX.into()) must be used. Code is clearer if errors are explicitly wrapped in Err.
  • v1.1.2 Changes

    ๐Ÿ› Bug fixes

    • ๐Ÿ–จ 0.0 now prints correctly (used to print 0e0).
    • Unary operators are now properly recognized as an expression statement.
    • Reverses a regression on string + operations.
    • ๐Ÿ“ฆ The global namespace is now searched before packages, which is the correct behavior.
  • v1.1.1 Changes

    ๐Ÿ› Bug fixes

    • Assignment to indexing expression with dot expressions inside no longer cause a compilation error.
    • The no_module and internals features now work together without a compilation error.
    • โšก๏ธ String literal operations (such as "hello" + ", world") now optimizes correctly.
  • v1.1.0 Changes

    ๐Ÿ› Bug fixes

    • Custom syntax starting with a disabled standard keyword now works properly.
    • ๐Ÿšš When calling Engine::call_fn, new variables defined during evaluation of the body script are removed and no longer spill into the function call.
    • ๐Ÿ›  NamespaceRef::new is fixed.

    โœจ Enhancements

    Engine API

    • Engine::consume_XXX methods are renamed to Engine::run_XXX to make meanings clearer. The consume_XXX API is deprecated.
    • Engine::register_type_XXX are now available even under no_object.
    • ๐Ÿ“œ Added Engine::on_parse_token to allow remapping certain tokens during parsing.
    • Added Engine::const_empty_string to merge empty strings into a single instance.

    Custom Syntax

    • ๐Ÿ‘ $symbol$ is supported in custom syntax to match any symbol.
    • Custom syntax with $block$, } or ; as the last symbol are now self-terminating (i.e. no need to attach a terminating ;).

    Dynamic Values

    • Dynamic::as_string and Dynamic::as_immutable_string are deprecated and replaced by into_string and into_immutable_string respectively.
    • โž• Added a number of constants to Dynamic.
    • โž• Added a number of constants and fromXXX constant methods to Dynamic.
    • โž• Added sin, cos and tan for Decimal values.

    Decimal Values

    • parse_float(), PI() and E() now defer to Decimal under no_float if decimal is turned on.
    • โž• Added log10() for Decimal.
    • ln for Decimal is now checked and won't panic.

    String Values

    • SmartString now uses LazyCompact instead of Compact to minimize allocations.
    • โž• Added pop for strings.
    • โž• Added ImmutableString::ptr_eq to test if two strings point to the same allocation.
    • ๐Ÿ“‡ The serde feature of SmartString is turned on under metadata to make Map serializable.

    Scope API

    • Scope::set_value now takes anything that implements Into<Cow<str> >.
    • โž• Added Scope::is_constant to check if a variable is constant.
    • Added Scope::set_or_push to add a new variable only if one doesn't already exist.


    • โž• Added ASTNode::position.
    • ๐Ÿšš ReturnType is removed in favor of option flags for Stmt::Return.
    • ๐Ÿ”€ Stmt::Break and Stmt::Continue are merged into Stmt::BreakLoop via an option flag.
    • StaticVec is changed to keep three items inline instead of four.
  • v1.0.6 Changes

    ๐Ÿ› Bug fixes

    • Eliminate unnecessary property write-back when accessed via a getter since property getters are assumed to be pure.
    • Writing to a property of an indexed valued obtained via an indexer now works properly by writing back the changed value via an index setter.

    โœจ Enhancements

    • ๐Ÿ“œ MultiInputsStream, ParseState, TokenIterator, IdentifierBuilder and AccessMode are exported under the internals feature.
  • v1.0.5 Changes

    ๐Ÿ› Bug fixes

    • FloatWrapper is no longer erroneously exported under no_float+internals.
    • The sign function now works properly for float values that are NaN.
  • v1.0.4 Changes

    • ๐Ÿ›  Fixed bug with catch variable used in catch block.
  • v1.0.2 Changes

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed bug in method call followed by an array indexing.
  • v1.0.1 Changes

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed bug in using indexing/dotting inside index bracket.
    • while and loop statements are no longer considered pure (since a loop can go on forever and this is a side effect).
  • v1.0.0 Changes

    The official version 1.0.

    ๐Ÿšš Almost the same version as 0.20.3 but with deprecated API's removed.

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  Fixed infinite loop in certain script optimizations.
    • ๐Ÿ— Building for no-std no longer requires patching smartstring.
    • ๐Ÿ“œ Parsing a lone return or throw without a semicolon at the end of a block no longer raises an error.

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿšš All deprecated API's (e.g. the RegisterFn and RegisterResultFn traits) are removed.
    • Module::set_id is split into Module::set_id and Module::clear_id pair.
    • begin, end, each, then, unless are no longer reserved keywords.

    โœจ Enhancements

    • New methods is_odd, is_even for integers, and is_zero for all numbers.
    • From<BTreeSet> and From<HashSet> are added for Dynamic, which create object maps with () values.