{"id":15538731,"url":"https://github.com/rahul-thakoor/rust_gpiozero","last_synced_at":"2025-10-09T18:17:11.172Z","repository":{"id":41397933,"uuid":"116477270","full_name":"rahul-thakoor/rust_gpiozero","owner":"rahul-thakoor","description":"A library inspired by gpiozero written in Rust","archived":false,"fork":false,"pushed_at":"2024-06-06T12:39:54.000Z","size":119,"stargazers_count":244,"open_issues_count":21,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-01T15:59:06.861Z","etag":null,"topics":["embedded-hal","gpio","gpiozero","raspberry-pi","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rust_gpiozero","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/rahul-thakoor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2018-01-06T11:25:24.000Z","updated_at":"2025-08-31T03:47:36.000Z","dependencies_parsed_at":"2024-10-02T12:05:50.790Z","dependency_job_id":"cf314e90-a2cd-4020-a1e1-b6793eae4185","html_url":"https://github.com/rahul-thakoor/rust_gpiozero","commit_stats":{"total_commits":84,"total_committers":10,"mean_commits":8.4,"dds":"0.30952380952380953","last_synced_commit":"ba9ceaa1c67e16653f8dd3f599d3ca5b8b913308"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rahul-thakoor/rust_gpiozero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-thakoor%2Frust_gpiozero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-thakoor%2Frust_gpiozero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-thakoor%2Frust_gpiozero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-thakoor%2Frust_gpiozero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahul-thakoor","download_url":"https://codeload.github.com/rahul-thakoor/rust_gpiozero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahul-thakoor%2Frust_gpiozero/sbom","scorecard":{"id":759004,"data":{"date":"2025-08-11","repo":{"name":"github.com/rahul-thakoor/rust_gpiozero","commit":"ba9ceaa1c67e16653f8dd3f599d3ca5b8b913308"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"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":"Code-Review","score":4,"reason":"Found 12/29 approved changesets -- score normalized to 4","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":"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":"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":"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:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rahul-thakoor/rust_gpiozero/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rahul-thakoor/rust_gpiozero/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/rahul-thakoor/rust_gpiozero/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/rahul-thakoor/rust_gpiozero/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/rahul-thakoor/rust_gpiozero/ci.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 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":"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":"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":"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":"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 16 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-22T22:42:50.376Z","repository_id":41397933,"created_at":"2025-08-22T22:42:50.376Z","updated_at":"2025-08-22T22:42:50.376Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278262482,"owners_count":25957940,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["embedded-hal","gpio","gpiozero","raspberry-pi","rust"],"created_at":"2024-10-02T12:05:46.687Z","updated_at":"2025-10-09T18:17:11.143Z","avatar_url":"https://github.com/rahul-thakoor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust_gpiozero\n\n[![CI](https://github.com/rahul-thakoor/rust_gpiozero/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/rahul-thakoor/rust_gpiozero/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/rust_gpiozero)](https://crates.io/crates/rust_gpiozero)\n\nA simple interface to GPIO devices with Raspberry Pi.\n\nThis library is based on [GPIOZero](https://gpiozero.readthedocs.io/en/stable/index.html)\nlibrary.\n\n\nThe idea is to get started with physical computing using Rust with little coding\nby hiding the underlying complexity.\n\nThe library uses [BCM Pin numbering](https://pinout.xyz/)\n\n### Example : Blinking an LED\n\n```rust\n\nuse rust_gpiozero::*;\n\nfn main() {\n    // Create a new LED attached to Pin 17\n    let mut led = LED::new(17);\n\n    // on_time = 2 secs, off_time=3 secs\n    led.blink(2.0,3.0);\n\n    // prevent program from exiting immediately\n    led.wait();\n}\n\n```\n\n\n### Example : Wait for a Button Press\n```rust\n\nuse rust_gpiozero::*;\n\nfn main() {\n    // Create a button which is attached to Pin 17\n    let mut button = Button::new(17);\n    button.wait_for_press(None);\n    println!(\"button pressed\");\n}\n\n```\n\n\nCompare this to using the crate `sysfs_gpio` to blink an LED on the Raspberry Pi :\n\n```rust\n\nextern crate sysfs_gpio;\n\nuse sysfs_gpio::{Direction, Pin};\nuse std::thread::sleep;\nuse std::time::Duration;\n\nfn main() {\n    let my_led = Pin::new(127); // number depends on chip, etc.\n    my_led.with_exported(|| {\n        loop {\n            my_led.set_value(0).unwrap();\n            sleep(Duration::from_millis(200));\n            my_led.set_value(1).unwrap();\n            sleep(Duration::from_millis(200));\n        }\n    }).unwrap();\n}\n\n```\n\n\n## Install/Use\n\nTo use `rust_gpiozero`, first add this to your Cargo.toml:\n\n```toml\n[dependencies]\n rust_gpiozero = \"^0.2\"\n```\nCompiling your project on a Raspberry Pi directly can take significant time depending on the model. Ideally, you would cross compile your project then run it on the Raspberry Pi. \n\n[More information](https://github.com/japaric/rust-cross)\n\n## Features\n\nThe following features are planned :\n\n- [ ] Support for `embedded-hal`\n- [ ] Support for common devices such as Accelerometer, Temperature sensors, etc\n\n## Changelog\n\n[CHANGELOG.md](https://github.com/rahul-thakoor/rust_gpiozero/blob/master/CHANGELOG.md)\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contributing\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 be dual licensed as above, without any\nadditional terms or conditions.\n\nThanks for your interest in `rust_gpiozero`. I am a newbie rustacean and just started using the language! I am using this project to learn more about Rust. Feel free to give feedback or send PRs. Your experiences and feedback will also benefit others who use this library.\n\n## Credits\nThis library would not be possible without the great work of the maintainers of [GPIOZero](https://gpiozero.readthedocs.io/en/stable/index.html) and [rppal](https://github.com/golemparts/rppal)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-thakoor%2Frust_gpiozero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahul-thakoor%2Frust_gpiozero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahul-thakoor%2Frust_gpiozero/lists"}