{"id":20292384,"url":"https://github.com/ladroid/rusty-pkl","last_synced_at":"2025-04-11T11:22:28.799Z","repository":{"id":222039147,"uuid":"756086317","full_name":"ladroid/rusty-pkl","owner":"ladroid","description":"Lightweight Pkl parser for Rust","archived":false,"fork":false,"pushed_at":"2024-02-11T23:28:56.000Z","size":9,"stargazers_count":34,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T02:11:08.335Z","etag":null,"topics":["config","configuration","parser","parser-library","parsing","parsing-library","pkl","rust","rust-lang"],"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/ladroid.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-11T23:06:14.000Z","updated_at":"2025-03-01T17:38:18.000Z","dependencies_parsed_at":"2024-02-11T23:32:13.392Z","dependency_job_id":"0d7ef641-b2aa-4e7b-8bc3-2bc61e2b8cb4","html_url":"https://github.com/ladroid/rusty-pkl","commit_stats":null,"previous_names":["ladroid/pkl-rs","ladroid/rusty-pkl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Frusty-pkl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Frusty-pkl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Frusty-pkl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ladroid%2Frusty-pkl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ladroid","download_url":"https://codeload.github.com/ladroid/rusty-pkl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382127,"owners_count":21094541,"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":["config","configuration","parser","parser-library","parsing","parsing-library","pkl","rust","rust-lang"],"created_at":"2024-11-14T15:17:04.165Z","updated_at":"2025-04-11T11:22:28.770Z","avatar_url":"https://github.com/ladroid.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# rusty-pkl\r\n\r\nrusty-pkl is a Rust library for parsing Pkl configuration files. Pkl is a simple configuration language that supports hierarchical structures and various data types.\r\n\r\n## Features\r\n\r\n- Parse Pkl files into a structured data representation in Rust.\r\n- Support for basic Pkl syntax, including key-value pairs, nested objects, and common data types such as strings, integers, floats, and booleans.\r\n\r\n## Usage\r\n\r\n1. Clone this repository to your local machine\r\n\r\n2. Navigate to the project directory:\r\n\r\n3. Run the parser with the desired Pkl file:\r\n\r\n   ```bash\r\n   cargo run --example test.rs\r\n   ```\r\n\r\n## Example\r\n\r\nSuppose you have a Pkl file named `example.pkl` with the following content:\r\n\r\n```pkl\r\nname = \"Pkl: Configure your Systems in New Ways\"\r\nattendants = 100\r\nisInteractive = true\r\namountLearned = 13.37\r\n\r\nbird {\r\n  name = \"Common wood pigeon\"\r\n  diet = \"Seeds\"\r\n  taxonomy {\r\n    species = \"Columba palumbus\"\r\n  }\r\n}\r\n```\r\n\r\nRunning the parser with this file will produce structured output representing the parsed Pkl values.\r\n\r\n## Advanced Usage\r\n\r\nYou can also access specific parameters programmatically and assign them to variables using the provided functions in the library. For example, to access the `name` parameter:\r\n\r\n```rust\r\nuse pkl_rs::*;\r\n\r\nfn main() {\r\n    match parse_pkl(\"examples\\\\config.pkl\") {\r\n        Ok(pkl_value) =\u003e {\r\n            println!(\"Parsed Pkl value: {:?}\", pkl_value);\r\n            // You can further process the parsed Pkl value as needed\r\n            if let Some(value) = find_parameter(\u0026pkl_value, \"name\") {\r\n                println!(\"Found name parameter: {:?}\", value);\r\n            } else {\r\n                println!(\"Parameter 'name' not found.\");\r\n            }\r\n        }\r\n        Err(err) =\u003e {\r\n            eprintln!(\"Error parsing Pkl file: {}\", err);\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n## Contributing\r\n\r\nContributions are absolutely, positively welcome and encouraged! Contributions\r\ncome in many forms. You could:\r\n\r\n  1. Submit a feature request or bug report as an [issue].\r\n  2. Ask for improved documentation as an [issue].\r\n  3. Comment on issues that require feedback.\r\n  4. Contribute code via [pull requests].\r\n\r\n[issue]: https://github.com/ladroid/pkl-rs/issues\r\n[pull requests]: https://github.com/ladroid/pkl-rs/pulls\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladroid%2Frusty-pkl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladroid%2Frusty-pkl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladroid%2Frusty-pkl/lists"}