{"id":16312177,"url":"https://github.com/nadrieril/dhall-rust","last_synced_at":"2025-05-16T02:07:23.232Z","repository":{"id":39613778,"uuid":"173192890","full_name":"Nadrieril/dhall-rust","owner":"Nadrieril","description":"Maintainable configuration files, for Rust users","archived":false,"fork":false,"pushed_at":"2023-06-02T14:50:13.000Z","size":2758,"stargazers_count":317,"open_issues_count":12,"forks_count":26,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-16T02:07:20.274Z","etag":null,"topics":["configuration-language","dhall","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nadrieril.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2019-02-28T21:48:06.000Z","updated_at":"2025-05-07T21:04:19.000Z","dependencies_parsed_at":"2024-06-19T02:59:26.314Z","dependency_job_id":null,"html_url":"https://github.com/Nadrieril/dhall-rust","commit_stats":{"total_commits":1509,"total_committers":15,"mean_commits":100.6,"dds":"0.48641484426772696","last_synced_commit":"165c967bb397faa67ad56de85a50a8ea78b664e2"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadrieril%2Fdhall-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadrieril%2Fdhall-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadrieril%2Fdhall-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nadrieril%2Fdhall-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nadrieril","download_url":"https://codeload.github.com/Nadrieril/dhall-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453652,"owners_count":22073617,"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":["configuration-language","dhall","rust"],"created_at":"2024-10-10T21:47:18.702Z","updated_at":"2025-05-16T02:07:23.214Z","avatar_url":"https://github.com/Nadrieril.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/dhall-lang/dhall-lang/blob/master/img/dhall-logo.svg\" width=\"600\" alt=\"Dhall Logo\"\u003e\n\n[![crates.io][cratesio-badge]][cratesio-url]\n[![documentation][docs-badge]][docs-url]\n[![CI status][ci-badge]][ci-url]\n[![coverage status][codecov-badge]][codecov-url]\n[![dependency status][depsrs-badge]][depsrs-url]\n\n[cratesio-badge]: https://img.shields.io/crates/v/serde_dhall.svg?style=flat-square\n[docs-badge]: https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\n[ci-badge]: https://img.shields.io/github/workflow/status/Nadrieril/dhall-rust/Test%20suite?style=flat-square\n[codecov-badge]: https://img.shields.io/codecov/c/github/Nadrieril/dhall-rust?style=flat-square\n[depsrs-badge]: https://deps.rs/repo/github/nadrieril/dhall-rust/status.svg\n\n[cratesio-url]: https://crates.io/crates/serde_dhall\n[docs-url]: https://docs.rs/serde_dhall\n[ci-url]: https://github.com/Nadrieril/dhall-rust/actions\n[codecov-url]: https://codecov.io/gh/Nadrieril/dhall-rust\n[depsrs-url]: https://deps.rs/repo/github/nadrieril/dhall-rust\n\nDhall is a programmable configuration language optimized for\nmaintainability.\n\nYou can think of Dhall as: JSON + functions + types + imports\n\nNote that while Dhall is programmable, Dhall is not Turing-complete.  Many\nof Dhall's features take advantage of this restriction to provide stronger\nsafety guarantees and more powerful tooling.\n\nYou can find more details about the language by visiting the official website:\n\n* [https://dhall-lang.org](http://dhall-lang.org/)\n\n# STATUS\n\nI am no longer maintaining this project. I got it to support about 90% of the language but then lost faith in the usability of dhall for my purposes. I am willing to hand this over to someone who's excited about dhall and rust.\n\n# `dhall-rust`\n\nThis is the Rust implementation of the Dhall configuration language.\nIt is meant to be used to integrate Dhall in your application.\n\nIf you only want to convert Dhall to/from JSON or YAML, you should use the\nofficial tooling instead; instructions can be found\n[here](https://docs.dhall-lang.org/tutorials/Getting-started_Generate-JSON-or-YAML.html).\n\n## Usage\n\nFor now, the only supported way of integrating Dhall in your application is via\nthe `serde_dhall` crate, and only parsing is supported.\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nserde_dhall = \"0.12.1\"\n```\n\nReading Dhall files is easy and leverages the wonderful [`serde`](https://crates.io/crates/serde) library.\n\n```rust\nuse std::collections::BTreeMap;\n\n// Some Dhall data\nlet data = \"{ x = 1, y = 1 + 1 } : { x: Natural, y: Natural }\";\n\n// Deserialize it to a Rust type.\nlet deserialized_map: BTreeMap\u003cString, u64\u003e = serde_dhall::from_str(data).parse().unwrap();\n\nlet mut expected_map = BTreeMap::new();\nexpected_map.insert(\"x\".to_string(), 1);\nexpected_map.insert(\"y\".to_string(), 2);\n\nassert_eq!(deserialized_map, expected_map);\n```\n\n`dhall` requires Rust \u003e= 1.60.0\n\n## Standard-compliance\n\nThis implementation currently supports most of the [Dhall\nstandard](https://github.com/dhall-lang/dhall-lang) version `20.0.0`.\n\nThe main missing feature is import headers. See\n[here](https://github.com/Nadrieril/dhall-rust/issues?q=is%3Aopen+is%3Aissue+label%3Astandard-compliance)\nfor a list of the other missing features.\n\n## Contributing\n\nThis section will cover how we can get started on contributing this project.\n\n### Setting up the repository\n\nTo get a copy of this repository we can run:\n\n```bash\n$ git clone https://github.com/Nadrieril/dhall-rust.git\n```\n\nBut we also might note that it's better practice to fork the repository to your own workspace.\nThere you can make changes and submit pull requests against this repository.\n\nAfter the repositry has been cloned we need to update the [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)\nin the project, i.e. `dhall-lang`. We can do this by running:\n\n```bash\n$ git submodule update --init --recursive\n```\n\n### Building and Testing\n\nA preferred method among the Rust community for developing is to use [`rustup`](https://rustup.rs/).\n\nIt can be installed by running:\n\n```bash\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nor if [nix](https://nixos.org/) is your tool of choice:\n\n```bash\n$ nix-shell -p rustup\n```\n\nOnce `rustup` is installed we can get it to manage our toolchain by running:\n\n```bash\n$ rustup toolchain install stable\n```\n\nThen we can manage our building and testing with the [`cargo`](https://crates.io/) dependency manager:\n\n```bash\n$ cargo build\n```\n\n```bash\n$ cargo test -- -q\n```\n\nYou can also run tests individually by their name:\n\n```bash\n$ cargo test tests::spec::name_of_test\n```\n\nNow we can have fun and happy contributing!\n\n### Test suite\n\nThe test suite uses tests from the dhall-lang submodule as well as from the\nlocal `dhall/tests` directory.\nThe various tests are run according to the instructions present in\n[`dhall-lang/tests/README.md`](https://github.com/dhall-lang/dhall-lang/blob/master/tests/README.md).\n\nIf an output test file (a `fooB.dhall` file) is missing, we will generate it automatically.\nThis is useful when writing new tests. Don't forget to commit it to git !\n\nIf one of the specification tests fails but you prefer the new output, you can\nrun the test(s) with `--bless` to overwrite the result file with the new\noutput. This happens often with ui tests (see below), since we may want to\nchange the phrasing of errors for example. Note that the `--bless` argument is\nonly accepted by the `spec` tests and will not be recognized if you also run\nother test.\n\n```bash\n$ cargo test --test spec -- -q --bless\n```\n\nIn addition to the usual dhall tests, we additionally run \"ui tests\", that\nensure that the output of the various errors stays good.\nThe output of the ui tests is stored in the local `dhall/tests` directory, even\nfor the tests coming from dhall-lang. They are stored in a `.txt` file with the\nsame name as the corresponding test.\n\n### Commit messages\n\nI try to keep commit messages somewhat in the style of [Conventional\nCommits](https://www.conventionalcommits.org/en/v1.0.0). That means the commit\nmessage should start with `feat:`, `test:`, `spec:`, `doc:`, `fix:`, `style:`,\n`refactor:`, `chore:`, `perf:` or similar prefixes.\n\nA breaking change should be indicated with `!` before the `:`.\n\n\n## [Changelog](CHANGELOG.md)\n\n## License\n\nLicensed under the terms of the 2-Clause BSD License ([LICENSE](LICENSE) or\nhttps://opensource.org/licenses/BSD-2-Clause)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadrieril%2Fdhall-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnadrieril%2Fdhall-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadrieril%2Fdhall-rust/lists"}