Skip to content

v.0.19.9

Compare
Choose a tag to compare
@schungx schungx released this 30 Dec 08:00
253e43d

This version fixes a bug introduced in 0.19.8 which breaks property access
within closures.

It also removes the confusing differences between packages and modules
by unifying the terminology and API under the global umbrella of modules.

Version 0.19.9 released to crates.io.

Bug fixes

  • Fix bug when accessing properties in closures.
  • Fix bug when accessing a deep index with a function call.
  • Fix bug that sometimes allow assigning to an invalid l-value.
  • Fix off-by-one error with Engine::set_max_call_levels.

Breaking changes

  • Engine::load_package is renamed Engine::register_global_module and now must explicitly pass a shared [Module].
  • Engine::register_module is renamed Engine::register_static_module and now must explicitly pass a shared [Module].
  • Package::get is renamed Package::as_shared_module.
  • Engine::set_module_resolver now takes a straight module resolver instead of an Option. To disable module resolving, use the new DummyModuleResolver.

Enhancements

  • Scope is now Clone + Hash.
  • Engine::register_static_module now supports sub-module paths (e.g. foo::bar::baz).
  • Engine::register_custom_operator now accepts reserved symbols.
  • Engine::register_custom_operator now returns an error if given a precedence of zero.
  • The examples repl and rhai_runner are moved into bin and renamed rhai-repl and rhai-run respectively.