Just by reviewing the code (haven't actually ran it) I'm pretty sure this library from suffers the same bugs as I've reported to another JsonLogic Rust implementation (except for the type coercion, which seems to be done right here):
https://github.com/Bestowinc/json-logic-rs/issues/27
Long story short: The indices are supposed to operate on UTF-16 surrogate pairs, but in this library they act on full code points, and furthermore String::len() is used at some point which returns the number of bytes as encoded by UTF-8 and as such negative indices on any non-ASCII strings are broken (internally inconsistent).
Just by reviewing the code (haven't actually ran it) I'm pretty sure this library from suffers the same bugs as I've reported to another JsonLogic Rust implementation (except for the type coercion, which seems to be done right here): https://github.com/Bestowinc/json-logic-rs/issues/27
Long story short: The indices are supposed to operate on UTF-16 surrogate pairs, but in this library they act on full code points, and furthermore
String::len()
is used at some point which returns the number of bytes as encoded by UTF-8 and as such negative indices on any non-ASCII strings are broken (internally inconsistent).