{"id":47300594,"url":"https://github.com/rust-embedded/embedded-hal-mock","last_synced_at":"2026-03-31T06:00:48.802Z","repository":{"id":37952358,"uuid":"126698547","full_name":"rust-embedded/embedded-hal-mock","owner":"rust-embedded","description":"Mocks for testing embedded-hal based drivers without hardware access.","archived":false,"fork":false,"pushed_at":"2026-03-11T07:22:43.000Z","size":241,"stargazers_count":142,"open_issues_count":18,"forks_count":29,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-11T14:10:04.260Z","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/rust-embedded.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-03-25T13:08:52.000Z","updated_at":"2026-03-11T07:22:47.000Z","dependencies_parsed_at":"2023-11-29T17:27:55.382Z","dependency_job_id":"6ee2b2fe-22c7-415e-8fb9-5bf5962e0d78","html_url":"https://github.com/rust-embedded/embedded-hal-mock","commit_stats":{"total_commits":160,"total_committers":27,"mean_commits":5.925925925925926,"dds":"0.39375000000000004","last_synced_commit":"6b69d2fe7f7b4dc048bd5e04b5666b13f7115beb"},"previous_names":["rust-embedded/embedded-hal-mock"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/rust-embedded/embedded-hal-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded%2Fembedded-hal-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded%2Fembedded-hal-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded%2Fembedded-hal-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded%2Fembedded-hal-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-embedded","download_url":"https://codeload.github.com/rust-embedded/embedded-hal-mock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-embedded%2Fembedded-hal-mock/sbom","scorecard":{"id":329200,"data":{"date":"2025-08-11","repo":{"name":"github.com/dbrgn/embedded-hal-mock","commit":"1ae5f3aa3b78ab953eefbd9d523817af9c5f66dd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":7,"reason":"Found 13/17 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/dbrgn/embedded-hal-mock/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/dbrgn/embedded-hal-mock/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/dbrgn/embedded-hal-mock/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/dbrgn/embedded-hal-mock/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T03:10:32.846Z","repository_id":37952358,"created_at":"2025-08-18T03:10:32.846Z","updated_at":"2025-08-18T03:10:32.846Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31223291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-31T04:08:55.938Z","status":"ssl_error","status_checked_at":"2026-03-31T04:08:47.883Z","response_time":111,"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":[],"created_at":"2026-03-17T01:38:19.996Z","updated_at":"2026-03-31T06:00:48.792Z","avatar_url":"https://github.com/rust-embedded.png","language":"Rust","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/rust-embedded/embedded-hal-mock/actions/workflows/ci.yml\n[github-actions-badge]: https://github.com/rust-embedded/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","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-embedded%2Fembedded-hal-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-embedded%2Fembedded-hal-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-embedded%2Fembedded-hal-mock/lists"}