{"id":25444064,"url":"https://github.com/openleadr/openleadr-rs","last_synced_at":"2026-01-26T15:01:22.147Z","repository":{"id":258256493,"uuid":"866009978","full_name":"OpenLEADR/openleadr-rs","owner":"OpenLEADR","description":"OpenADR 3.0 VTN and VEN implementation in Rust","archived":false,"fork":false,"pushed_at":"2026-01-13T09:50:05.000Z","size":1002,"stargazers_count":63,"open_issues_count":28,"forks_count":17,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-01-13T10:54:44.850Z","etag":null,"topics":["energy","lf-energy","openadr","rust-library"],"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/OpenLEADR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2024-10-01T13:50:22.000Z","updated_at":"2026-01-13T08:51:12.000Z","dependencies_parsed_at":"2025-04-10T02:20:48.044Z","dependency_job_id":"17db1987-58bb-4c4a-a660-b5b1d7013ff2","html_url":"https://github.com/OpenLEADR/openleadr-rs","commit_stats":null,"previous_names":["openleadr/openleadr-rs"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/OpenLEADR/openleadr-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLEADR%2Fopenleadr-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLEADR%2Fopenleadr-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLEADR%2Fopenleadr-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLEADR%2Fopenleadr-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenLEADR","download_url":"https://codeload.github.com/OpenLEADR/openleadr-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenLEADR%2Fopenleadr-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28781308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["energy","lf-energy","openadr","rust-library"],"created_at":"2025-02-17T15:18:37.914Z","updated_at":"2026-01-26T15:01:22.128Z","avatar_url":"https://github.com/OpenLEADR.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9656/badge)](https://www.bestpractices.dev/projects/9656)\n[![LFX Health Score](https://img.shields.io/static/v1?label=Health%20Score\u0026message=Stable\u0026color=0094FF\u0026logo=linuxfoundation\u0026logoColor=white\u0026style=flat)](https://insights.linuxfoundation.org/project/openleadr/repository/openleadr-openleadr-rs)\n![codecov](https://codecov.io/gh/OpenLEADR/openleadr-rs/graph/badge.svg?token=BKQ0QW9G8H)\n![Checks](https://github.com/OpenLEADR/openleadr-rs/actions/workflows/checks.yml/badge.svg?branch=main)\n\n# OpenADR 3.0 and 3.1 in Rust\n\n![LF energy OpenLEADR logo](https://github.com/OpenLEADR/openleadr-rs/raw/refs/heads/main/openleadr-logo.svg)\n\nOpenADR is a protocol for automated demand-response in electricity grids, like dynamic pricing or load shedding. The [OpenADR alliance](https://www.openadr.org/) is responsible for the standard, which can be [downloaded](https://www.openadr.org/specification) free of charge.\n\nThis repository contains an **OpenADR 3.0 client (VEN)** library and a **server (VTN)** implementation, both written in Rust.\n\nAs of November 2025, **we've started implementing OpenADR 3.1** in the [`openadr3_1` branch](https://github.com/OpenLEADR/openleadr-rs/tree/openadr3_1).\nOnce the changes are complete, we will merge them into the `main` branch and will discontinue support for OpenADR 3.0.\n\nPlease note that the changes of 3.1 compared to 3.0 are not backwards compatible. \nAt the moment, we don't plan to offer upgrade instructions as we don't expect a need for that.\nFeel free to reach out if this assumption seems wrong.\n\nThanks to our sponsors [ElaadNL](https://elaad.nl/en/) and [Tweede Golf](https://tweedegolf.nl/en)\nfor making this work possible!\n\n## Interoperability\nThe code in this repository is written in Rust. Nevertheless, you can easily combine the server, i.e., VTN implementation with a client, i.e., VEN written in any language you prefer, such as Python, Node.js, or Java. This because the VTN is a stand-alone binary and the interactions with the VEN happen over HTTP.\n\nIf your business or client logic is written in Rust too, you may be interested in using the client library of this repository as well. It's mainly a thin layer to abstract the HTTP interaction with the VTN. If not, it's probably easiest to implement your own client.\n\n## Documentation\n\nThe documentation of the project is an ongoing effort:\n\n- The [`./openleadr-client`](./openleadr-client) and [`./openleadr-vtn`](./openleadr-vtn) directories contain READMEs on how to get\nstarted with the client library and server, respectively. \n- The [client](https://crates.io/crates/openleadr-client), [server](https://crates.io/crates/openleadr-vtn), and [common data types](https://crates.io/crates/openleadr-wire) are published to crates.io\nand have documentation available on docs.rs.\n- [#17](https://github.com/OpenLEADR/openleadr-rs/issues/17) aims\nto produce a detailed OpenAPI specification of the VTN API we provide.\n\n## Getting started\n\n### First time setup\n\nYour machine needs a recent version of Rust installed.\nPlease refer to the [official installation website](https://rustup.rs/) for instructions for your platform. To apply the database migrations, you also need the sqlx-cli installed.\nSimply run `cargo install sqlx-cli`. Additionally, you need `postgresql-client` installed (version 16 or newer).\n\n### Docker compose\n\nFor a quick start,\nthis repository contains a [`docker-compose.yml`](docker-compose.yml) with the VTN and a Postgres database.\nTo start it, first start the database and run the migrations:\n\n```bash\ndocker compose up -d db # start the DB\ncargo sqlx migrate run  # apply the migrations\ndocker compose up -d    # start all other containers, i.e., the VTN\n```\n\nAfterward, the VTN should be reachable at `http://localhost:3000`.\n\nFor a more detailed guide,\nplease refer to the Readmes in the [`./openleadr-client`](./openleadr-client) and\n[`./openleadr-vtn`](./openleadr-vtn) directories.\n\n## Supported features\n\nThis repository contains only OpenADR 3.0, older versions are not supported.\n\nCurrently, real-time updates via the webhook mechanism, known as subscriptions in the specification, are not supported.\nWhile we currently do not plan to add this ourselves, we warmly welcome any contribution or sponsoring to add it.\nSee the [Contributing section](#contributing) if you are interested.\n\nThe VTN implements its own OAuth provider, which is mainly relevant for testing and prototyping.\nBesides that, the VTN can also be configured to use a third-party OAuth provider,\nsee the [documentation](./openleadr-vtn/README.md#internal-vs-external-oauth-provider) for details.\n\nThe client and server do support creating, retrieving, updating,\nand deleting programs, events, reports, VENs, and resources.\nBoth sides support authentication and authorization handling\nand optionally allow for a more fine-grained access control than required by the specification.\n\nThe VTN stores the data in a Postgres database,\nbut the code base is ready for using other data stores as well in the future.\nAgain, we warmly welcome contributions or sponsoring if you are interested in adding additional storage support.\n\nThe VEN is a library for conveniently interacting with the REST API provided by a VTN.\nWe aim for a clean and easy-to-understand API of the library to be used by business or VEN logic.\nAdditionally, we will use the library to create a CLI application for easy testing and prototyping,\nsee [#52](https://github.com/OpenLEADR/openleadr-rs/issues/52) for the current progress.\n\n## Testing\nThe Rust tests in this repository cover most of the functionality.\nWe use [CodeCov](https://app.codecov.io/gh/OpenLEADR/openleadr-rs/) to keep track of the test coverage,\nand have an outstanding issue [#75](https://github.com/OpenLEADR/openleadr-rs/issues/75)\nto improve the test coverage even further.\nThese tests are executed in GitHub Actions on every pull request.\nTo execute them locally, run:\n\n```bash\ndocker compose up db -d     # start up a Postgres DB in the background\ncargo sqlx migrate run # apply the DB scheme\n# load default credentials for integration testing of the client library\npsql -U openadr -W openadr -h localhost openadr \u003c fixtures/test_user_credentials.sql\ncargo test --workspace      # execute the tests\n```\n\nIn addition to the tests we developed ourselves, there exists a test suite maintained by the OpenADR alliance.\nAs it is closed source, we cannot integrate this test suite with the CI, unfortunately.\nNevertheless, we executed the tests locally to check for incompatibilities.\nCurrently, all except for two of the 168 test cases that are applicable for us pass.\n\nThe two failing test cases are a result of that we do the permission management a bit different from the specification.\nIn particular, we do not allow VENs to delete their own reports but instead allow this to the business logic (BL).\nThe two test cases assume the opposite, VENs should be able to delete reports, and BLs should not be able to.\nSee also [#11](https://github.com/OpenLEADR/openleadr-rs/issues/11).\n\nThe following screenshot shows the test results of the test suite from the OpenADR alliance,\nexecuted against commit [`5c4e281`](https://github.com/OpenLEADR/openleadr-rs/tree/5c4e281fdc96f7332675325e0d4da8cc1005dfe2).\nThe 38 failing tests not mentioned before are testing the *subscription*\nfeature not supported by this application yet.\nSee also [Supported features](#supported-features).\n\n![OpenADR alliance test suite screenshot](OpenADR_alliance_test_suite.png)\n\n## Contributing\nWe expect you to follow our [code of conduct](CODE_OF_CONDUCT.md) for any contribution.\n\nIf you are missing a feature or see unexpected behavior,\ndo not hesitate to open an issue on our [GitHub](https://github.com/OpenLEADR/openleadr-rs) page.\nIf you suspect a security-critical issue, please refer to [`SECURITY.md`](SECURITY.md).\n\nAdditionally, we are happy to see pull requests on this repository as well.\nWe prefer to know when you intend to develop some functionality to make sure that there aren't multiple people working on the same issue. Simply drop a short note to the corresponding issue.\n\nFor your commits, please make sure you add a `signed-off-by` appendix to your commit message,\nas the [LF energy contribution guidelines](https://tac.lfenergy.org/process/contribution_guidelines.html#developer-certificate-of-origin) require that.\nBy doing so, you acknowledge the text in [`CONTRIBUTING`](CONTRIBUTING).\nThe easiest way is to add a `-s` flag to the `git commit` command, i.e. use `git commit -s`.\n\nIf you are interested in contributing but don't know where to start,\ncheck out issues marked as [good first issue](https://github.com/OpenLEADR/openleadr-rs/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\nor [help wanted](https://github.com/OpenLEADR/openleadr-rs/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22),\nor simply open an issue and ask for good starting points.\n\n## Can I rely on this project?\n\nAs with any other open source project, you should carefully consider if it meets the reliability requirements for your specific use case. That said:\n- We are committed to maintaining the project at least during 2026.\n- A maintenace budget to do so is in place.\n- Tweede Golf is able to offer custom support, or a service level agreement (SLA), if needed; if you're interested, please reach out.\n\n## Current sponsors\n- [ElaadNL](https://elaad.nl/en/)\n- [Tweede Golf](https://tweedegolf.nl/en)\n\n## Contact\n- ElaadNL: Ton Smets: ton.smets@elaad.nl\n- Tweede Golf: \n  - Maximilian Pohl (tech lead): max@tweedegolf.com\n  - Hugo van de Pol (project lead): hugo@tweedegolf.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenleadr%2Fopenleadr-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenleadr%2Fopenleadr-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenleadr%2Fopenleadr-rs/lists"}