Best approach for configuration in Lua #221
Answered
by
khvzak
Milo123459
asked this question in
Q&A
-
Hey! I'm just curious on what the best approach for creating some sort of configuration object is via mlua. It should be accessible and editable via the Lua code and readable on the Rust side, for example: Config {
Routes = {...
} and I could then access that on the rust side via config.routes or something like that. Not sure what the best approach is, please let me know! |
Beta Was this translation helpful? Give feedback.
Answered by
khvzak
Nov 11, 2022
Replies: 1 comment
-
have you tried to use serde for that? just define struct in rust and deserialize lua object into it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Milo123459
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
have you tried to use serde for that? just define struct in rust and deserialize lua object into it.