-
When I define a custom operator as described here https://rhai.rs/book/engine/custom-op.html#example
it works as `foo(x,y)` and not as `x foo y`. Does infix only work for primitive types?
Also wh…
-
I've been having a lot of fun trying to build a [LambdaMOO](https://www.sindome.org/moo-manual.html) clone with Rhai as the scripting language. (For some context: imagine a realtime multiplayer text-b…
-
I saw examples of passing a callback from Rhai to Rust in the book, but they use global functions.
I'm trying to implement something like this:
```rust
variable.do_stuff(|v| println(v));
```
-
All tokens are available from the Rhai book.
Only very simple code can be parsed right now, a Pratt parsing algorithm is required for expressions (and precedence).
-
How to implement a custom function which can fail but without panicking during evaluation? So in case it fails the engine should return a `EvalAltResult` during evaluation.
I already noticed that a…
-
# Motivation
Suppose I want my users to be able to load native Rust functions into the engine at runtime (I'm writing a REPL), by using something like libloading to resolve a symbol from a C dynami…
-
I noticed some strange comparison behaviours:
```rhai
print(2.0 > 1.0);
print(2.0 > 1);
print(2.0 > true);
print(1.0 > |x| x + 1);
// but:
print(1.0 + |x| x + 1);
```
output:
```
Wa…
-
Hello, I'm trying to make something resembling `Singleton Command` pattern from the Rhai book, but I actually have multiple Rust-allocated objects, and want to manipulate them from a Rhai script.
One…
-
Hi, I was doing some research on embeddable programming languages, and I've found rhai, but i can't find any example of how this language looks like, it'd be great to add one, [gluon](https://github.c…
-
Hello. I have a Rust function that returns a `HashMap` (`ObjectID` is my newtype around u64 that implements both `Display` and `Debug`). But unfortunately when I'm trying to print this object from a R…