{"id":13995423,"url":"https://github.com/dbrgn/embedded-hal-mock","last_synced_at":"2025-05-15T10:01:04.193Z","repository":{"id":37952358,"uuid":"126698547","full_name":"dbrgn/embedded-hal-mock","owner":"dbrgn","description":"Mocks for testing embedded-hal based drivers without hardware access.","archived":false,"fork":false,"pushed_at":"2025-04-26T20:05:33.000Z","size":229,"stargazers_count":127,"open_issues_count":16,"forks_count":28,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-07T23:49:53.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/embedded-hal-mock/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbrgn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2018-03-25T13:08:52.000Z","updated_at":"2025-04-26T20:05:36.000Z","dependencies_parsed_at":"2023-11-29T17:27:55.382Z","dependency_job_id":"6ee2b2fe-22c7-415e-8fb9-5bf5962e0d78","html_url":"https://github.com/dbrgn/embedded-hal-mock","commit_stats":{"total_commits":160,"total_committers":27,"mean_commits":5.925925925925926,"dds":"0.39375000000000004","last_synced_commit":"6b69d2fe7f7b4dc048bd5e04b5666b13f7115beb"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Fembedded-hal-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Fembedded-hal-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Fembedded-hal-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrgn%2Fembedded-hal-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbrgn","download_url":"https://codeload.github.com/dbrgn/embedded-hal-mock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319715,"owners_count":22051072,"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":[],"created_at":"2024-08-09T14:03:23.976Z","updated_at":"2025-05-15T10:01:03.375Z","avatar_url":"https://github.com/dbrgn.png","language":"Rust","funding_links":[],"categories":["Rust","Test Frameworks"],"sub_categories":["Mocking and Hardware Simulation"],"readme":"# embedded-hal-mock\n\n[![GitHub Actions][github-actions-badge]][github-actions]\n[![Crates.io Version][version-badge]][crates-io]\n\nThis is a collection of types that implement the embedded-hal traits.\n\nThe implementations never access real hardware. Instead, the hardware is mocked\nor no-op implementations are used.\n\nThe goal of the crate is to be able to test drivers in CI without having access\nto hardware.\n\n[Docs](https://docs.rs/embedded-hal-mock/)\n\n## Usage\n\nSee module-level docs for more information.\n\n## embedded_hal version\n\nThis crate supports both version 0.x and version 1.x of embedded-hal.  By default only support\nfor version 0.x is enabled.  To enable support for version 1.x, use the `eh1` feature.\n\n## Cargo Features\n\nThere are currently the following cargo features:\n\n- `eh0`: Provide module `eh0` that mocks embedded-hal version 0.x\n- `eh1`: Provide module `eh1` that mocks embedded-hal version 1.x (enabled by default)\n- `embedded-time`: Enable the `eh0::timer` module (enabled by default)\n- `embedded-hal-async`: Provide mocks for embedded-hal-async in `eh1`\n\n## no\\_std\n\nCurrently this crate is not `no_std`. If you think this is important, let\nme know.\n\n## Status\n\n| Feature                                     | embedded-hal | embeded-hal-async |\n|---------------------------------------------|--------------|-------------------|\n| I²C                                         | ✅           | ✅               |\n| SPI                                         | ✅           | ✅               |\n| No-op delay                                 | ✅           | ✅               |\n| Actual delay                                | ✅           | ✅               |\n| Serial                                      | ✅           | -                |\n| RNG                                         | -            | -                |\n| I/O pins (including PWM)                    | ✅           | ✅               |\n| ADC                                         | ✅           | -                |\n| Timers (with `embedded-time` Cargo feature) | ✅           | -                |\n\nPull requests for more mock implementations are welcome! :)\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate is guaranteed to compile on the latest stable Rust release. It\n*might* compile with older versions but that may change in any new patch\nrelease.\n\n## Development Version of `embedded-hal`\n\nIf you would like to use the current development version of `embedded-hal` (or any other version),\nso long as they are API compatible you can use a patch field in your `Cargo.toml` file to override\nthe dependency version.\n\n```yaml\n[patch.crates-io]\neh1 = { git = \"https://github.com/rust-embedded/embedded-hal\" }\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   http://opensource.org/licenses/MIT) at your option.\n\n### Contributing\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\n\u003c!-- Badges --\u003e\n[github-actions]: https://github.com/dbrgn/embedded-hal-mock/actions/workflows/ci.yml\n[github-actions-badge]: https://github.com/dbrgn/embedded-hal-mock/actions/workflows/ci.yml/badge.svg\n[crates-io]: https://crates.io/crates/embedded-hal-mock\n[version-badge]: https://img.shields.io/crates/v/embedded-hal-mock.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrgn%2Fembedded-hal-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbrgn%2Fembedded-hal-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrgn%2Fembedded-hal-mock/lists"}