Set rust variables using lua config files (WASM)

Is it possible to set rust variables using lua config files?
Something like using lua wasm files in rust code.

Well I've seen a few tools like rlua, lua-wasm etc, but doesn't wasm support let you automatically convert a language's variables into another's or something like that? So, I think you can do that without the help of these other tools. Can you help me out?

I don't think so. I'm not super WASM savvy yet, but I'm pretty sure you can only natively send numbers over WASM functions and so it takes some organization and tooling if you want to be able to use things like strings across the WASM border. That's where projects like wasm_bindgen come into play to help orchestrate that and take the work out of allocating WASM memory and converting strings to pointers and such. ( but wasm_bindgen is for JavaScript )

There probably isn't a super easy route to being able to do that yet. With a little bit of work you could probably do it yourself, but you would have to learn how to do that first, which may or may not be on your ideal TODO list. :confused:

There has been mention of something wasm_bindgen that isn't for web, but it hasn't been released yet.

Thanks for giving me a solid start. That's exactly what I need, though it looks like it is still in its early stages. It's a whole new world once this takes off.

1 Like