1 unstable release

0.1.0 Feb 1, 2024

#2344 in Parser implementations

Download history 2/week @ 2024-02-16 14/week @ 2024-02-23 5/week @ 2024-03-01 7/week @ 2024-03-08 80/week @ 2024-03-15 6/week @ 2024-03-22 18/week @ 2024-03-29 6/week @ 2024-04-05 42/week @ 2024-04-12

75 downloads per month

Apache-2.0

7KB
130 lines

toml2lua

Convert TOML to Lua table

Version badge Downloads badge License badge Docs badge

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
~26K SLoC