1 unstable release
0.1.0 | Feb 1, 2024 |
---|
#146 in #lua
7KB
130 lines
toml2lua
Convert TOML to Lua table
Example:
use toml2lua::parse;
let toml = r#"
string = "abc"
int = 123
bool = true
[object]
key = "value"
"#;
let lua = parse(toml).unwrap();
// Output:
// {
// ["string"] = "abc",
// ["int"] = 123,
// ["bool"] = true,
// ["object"] = {
// ["key"] = "value",
// },
// }
lib.rs
:
toml2lua
Convert TOML to Lua table
Example:
use toml2lua::parse;
let toml = r#"
string = "toml2lua",
int = 420,
bool = true,
[object]
key = "value"
"#;
let lua = parse(toml).unwrap();
// Output:
// {
// ["string"] = "toml2lua",
// ["int"] = 420,
// ["bool"] = true,
// ["object"] = {
// ["key"] = "value",
// },
// }
Made with <3 by Dervex
Dependencies
~1–1.4MB
~25K SLoC