2 releases

0.1.1 Jun 29, 2025
0.1.0 Jul 15, 2024

#6 in #lua-table

Download history 52/week @ 2025-12-31 16/week @ 2026-01-28 244/week @ 2026-02-25 8/week @ 2026-03-04 23/week @ 2026-03-25 27/week @ 2026-04-01 1/week @ 2026-04-15

51 downloads per month

Apache-2.0

8KB
187 lines

yaml2lua

Convert YAML to Lua table

Version badge Downloads badge License badge Docs badge

Example:

use yaml2lua::parse;

let yaml = r#"
string: yaml2lua
int: 420
bool: true

array:
  - abc
  - 123
"#;

let lua = parse(yaml).unwrap();
// Output:
// {
//   ["string"] = "yaml2lua",
//   ["int"] = 420,
//   ["bool"] = true,
//   ["array"] = {
//      "abc",
//      123,
//   },
// }

Notes

  • Mappings only support String, Number and Bool keys
  • Tagged values are not supported yet

Dependencies

~1.6–2.5MB
~53K SLoC