Repository navigation
v0.15.1
This is a minor release which enables updating indexers (via registered indexer setters) and supports functions
with &str parameters (maps transparently to ImmutableString). WASM is also a tested target.
Version 0.15.1 released to crates.io
Bug fix
let s="abc"; s[1].change_to('X');now correctly sets the character 'X' into 's' yielding"aXc".
Breaking changes
- Callback closure passed to
Engine::on_progressnow takes&u64instead ofu64to be consistent with other callback signatures. Engine::register_indexeris renamed toEngine::register_indexer_get.Module::set_indexer_fnis renamed toModule::set_indexer_get_fn.- The tuple
ParseErrornow exposes the internal fields and theParseError::error_typeandParseError::positionmethods are removed. The first tuple field is theParseErrorTypeand the second tuple field is thePosition. Engine::call_fn_dynamicnow takes any type that implementsIntoIterator<Item = Dynamic>.
New features
- Indexers are now split into getters and setters (which now support updates). The API is split into
Engine::register_indexer_getandEngine::register_indexer_setwithEngine::register_indexer_get_setbeing a shorthand. Similarly,Module::set_indexer_get_fnandModule::set_indexer_set_fnare added. Engine:register_fnandEngine:register_result_fnaccepts functions that take parameters of type&str(immutable string slice), which maps directly toImmutableString. This is to avoid needing wrappers for functions taking string parameters.- Set maximum limit on data sizes:
Engine::set_max_string_size,Engine::set_max_array_sizeandEngine::set_max_map_size. - Supports trailing commas on array literals, object map literals, function definitions and function calls.
- Enhances support for compiling to WASM.