yaml2lua

Crates.ioyaml2lua
lib.rsyaml2lua
version0.1.1
created_at2024-07-15 14:23:03.705597+00
updated_at2025-06-29 15:15:56.909704+00
descriptionConvert YAML to Lua table
homepage
repositoryhttps://github.com/DervexHero/yaml2lua
max_upload_size
id1303906
size21,931
Dervex (DervexDev)

documentation

README

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
Commit count: 0

cargo fmt