|
|
|
|
|
by tel
514 days ago
|
|
I’m already writing a Rust system. I’ve tried integrating with mlua. It works, but Rhai is simpler to embed. Simpler to build. (I also tried Piccolo which is very cool but also not simple.) Rhai also doesn’t include a lot of complexity that Lua does. It encourages you to write extension types in Rust, which is what I want. Rhai doesn’t have GC, just refcounts. Rhai also can disable a lot of features, say if you just want an expression language. I use it to write trading logic. I like that it’s stripped down and simple. |
|
Anyways I used mlua because it was the easiest way to get some scripting to run. But I faced issues writing the scripts. Basic operations had to come from the host like “string endsWith”, “list contains” and some other basic methods (Can’t remember which ones it where in detail). That mixed with the fact that Lua is so different. I knew I could not give this to any other dev in my team without a lot of instructions how lua handles stuff differently. So it’s nice to know I have a potential new goto solution when facing this again. Especially the ability to dumb it down.