{"id":26554107,"url":"https://github.com/daksh14/rtoml","last_synced_at":"2025-06-14T18:08:50.916Z","repository":{"id":50529501,"uuid":"294082431","full_name":"Daksh14/Rtoml","owner":"Daksh14","description":"RToml is an experimental 100% handwritten toml parser","archived":false,"fork":false,"pushed_at":"2022-08-02T10:50:49.000Z","size":3972,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-14T18:08:49.768Z","etag":null,"topics":["parser","rust","toml"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daksh14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-09T10:42:38.000Z","updated_at":"2022-08-19T12:44:09.000Z","dependencies_parsed_at":"2022-09-10T11:40:39.408Z","dependency_job_id":null,"html_url":"https://github.com/Daksh14/Rtoml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Daksh14/Rtoml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daksh14%2FRtoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daksh14%2FRtoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daksh14%2FRtoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daksh14%2FRtoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daksh14","download_url":"https://codeload.github.com/Daksh14/Rtoml/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daksh14%2FRtoml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259860405,"owners_count":22922987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parser","rust","toml"],"created_at":"2025-03-22T09:50:32.125Z","updated_at":"2025-06-14T18:08:50.888Z","avatar_url":"https://github.com/Daksh14.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rtoml\n\nRtoml is a toml parser that's designed to\n\n1. Acquire values at compile time to a struct.\n2. Acquire values at runtime required to work. \n\nAt the core, a Toml value is represented by this enum\n```rust\npub enum TomlValue\u003c'a\u003e {\n    Int(i64),\n    Float(f64),\n    String(String),\n    Array(Vec\u003cTomlValue\u003c'a\u003e\u003e),\n    Boolean(bool),\n    DateTime(DateTime),\n    Table(Table\u003c'a\u003e),\n}\n```\n\n# Usage \n\nFor a toml file\n```toml\n[a_table]\nvalue = \"hello, world\"\n```\nWe will use the following code to acquire values\n```rust\nuse rtoml::prelude::*;\nuse std::error::Error;\n\nfn main() -\u003e Result\u003c(), TomlError\u003e {\n    let mut data = String::new();\n    let mut file = File::open(concat!(env!(\"CARGO_MANIFEST_DIR\"), \"/templates/test.toml\"))?;\n\n    file.read_to_string(\u0026mut data)?;\n\n    let toml = TomlValue::try_from(data.as_str())?;\n\n    if let Some(table) = toml.as_table() {\n        if let Some(key_value) = table.get(\u0026TomlKey::from(\"a_table\")) {\n            assert_eq!(key.get(\n                TomlKey::from(\"value\"),\n                TomlValue::Literal(String::from(\"hello, world\"))\n            ))\n        }\n    }\n\n    Ok(())\n}\n```\n\n# Benchmarks\n```\ncargo bench\nopen ./target/criterion/report/index.html\n```\n\n# TODO\n- [ ] Table dot `.` format in table names\n- [ ] Table arrays\n- [ ] Serialise derive traits\n- [ ] Use toml testing repo to run all tests \n\n# License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaksh14%2Frtoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaksh14%2Frtoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaksh14%2Frtoml/lists"}