-
-
It would be great to have anonymous functions in Rhai, and be able to programmatically call them from Rust.
Something like:
``` rust
let add = engine.eval:: i64>("fn (x,y) { x + y }").unwrap();
prin…
jeanm updated
4 years ago
-
Following usecase:
I have users input rhai script. I want some environment to be set up for every invocation of the script (Lets think of a global variable that should be available when the script …
-
-
I see documentation on how to define structs in Rust and then make them available for use in Rhai. These structs can have fields that are accessible with dot notation, e.g:
```
let foo = new_ts(); /…
-
Sorry if this question already asked, but I can't understand how can I put for example string to the scope? I'm trying to make something like string parser that will get strings as input and parse the…
-
I see that many use cases of Rhai currently are to evaluate expressions (without `while` loops, `for` loops, `if` statements etc.)
It would be good to have a mechanism to restrict the script to exp…
-
Embedded scripting languages are ripe for implementing systems for an ECS(Entity component system). Integration with an ECS would be ideal and I believe that Specs is the current front runner.
Per…
-
I'm new to Rust and asked this question in Discord. The response was to embed Lua in my application. Does this use case fit Rhai? Would Rhai be faster than Lua?
I have a Rust struct AGENT with fie…
-
A while ago, Rust introduced yet another amazing feature:
```rust
let x = loop {
// complicated computations
break 7;
};
assert_eq!(x, 7);
```
Would be cool if Rhai had it too. May…