{"id":13437811,"url":"https://github.com/avr-rust/ruduino","last_synced_at":"2026-01-24T09:01:06.498Z","repository":{"id":38241728,"uuid":"62759874","full_name":"avr-rust/ruduino","owner":"avr-rust","description":"Reusable components for the Arduino Uno.","archived":false,"fork":false,"pushed_at":"2022-12-22T06:53:37.000Z","size":128,"stargazers_count":732,"open_issues_count":19,"forks_count":49,"subscribers_count":26,"default_branch":"master","last_synced_at":"2026-01-14T11:38:06.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/avr-rust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-06T23:27:41.000Z","updated_at":"2025-12-30T15:40:09.000Z","dependencies_parsed_at":"2023-01-30T06:00:42.546Z","dependency_job_id":null,"html_url":"https://github.com/avr-rust/ruduino","commit_stats":null,"previous_names":["avr-rust/arduino"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/avr-rust/ruduino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avr-rust%2Fruduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avr-rust%2Fruduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avr-rust%2Fruduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avr-rust%2Fruduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avr-rust","download_url":"https://codeload.github.com/avr-rust/ruduino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avr-rust%2Fruduino/sbom","scorecard":{"id":218588,"data":{"date":"2025-08-11","repo":{"name":"github.com/avr-rust/ruduino","commit":"c0574999752c6bfc2c190312661a0c264247e5b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/19 approved changesets -- score normalized to 0","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":"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":"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/docker-image.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":"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":"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":"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":"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/docker-image.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/avr-rust/ruduino/docker-image.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile.ci:1: pin your Docker image by updating ubuntu:18.04 to ubuntu:18.04@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98","Warn: downloadThenRun not pinned by hash: Dockerfile.ci:13","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun 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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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-17T02:05:34.306Z","repository_id":38241728,"created_at":"2025-08-17T02:05:34.306Z","updated_at":"2025-08-17T02:05:34.306Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28721975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":"2024-07-31T03:01:00.393Z","updated_at":"2026-01-24T09:01:06.444Z","avatar_url":"https://github.com/avr-rust.png","language":"Rust","funding_links":[],"categories":["Development tools","开发工具 Development tools","开发工具"],"sub_categories":["Embedded","嵌入式 Embedded","嵌入式"],"readme":"# Ruduino\n\nThis library provides a set of reusable components for the Arduino Uno.\n\n## Overview\n\n### Register and bit definitions\n\n```rust\nuse ruduino::cores::current::PORTB;  // Register\nuse ruduino::cores::current::PORTB7; // Pin\n```\n\n### Prelude\n\nDisable interrupts.\n\n```rust\nwithout_interrupts(|| {\n    unsafe { write_volatile(DDRB, 0xFF) }\n})\n```\n\n### Timers\n\nConfigure a timer.\n\n```rust\nconst DESIRED_HZ_TIM1: f64 = 2.0;\nconst TIM1_PRESCALER: u64 = 1024;\nconst INTERRUPT_EVERY_1_HZ_1024_PRESCALER: u16 =\n    ((ruduino::config::CPU_FREQUENCY_HZ as f64 / (DESIRED_HZ_TIM1 * TIM1_PRESCALER as f64)) as u64 - 1) as u16;\n\ntimer1::Timer::new()\n    .waveform_generation_mode(timer1::WaveformGenerationMode::ClearOnTimerMatchOutputCompare)\n    .clock_source(timer1::ClockSource::Prescale1024)\n    .output_compare_1(Some(INTERRUPT_EVERY_1_HZ_1024_PRESCALER))\n    .configure();\n```\n\nSet up an interrupt handler that will be called when the timer fires.\n\n```rust\n#[no_mangle]\npub unsafe extern \"avr-interrupt\" fn _ivr_timer1_compare_a() {\n    let prev_value = read_volatile(PORTB);\n    write_volatile(PORTB, prev_value ^ PINB5);\n}\n```\n\n### Hardware Serial Port\n\nConfigure the serial port.\n\n```rust\nconst BAUD: u64 = 9600;\nconst UBRR: u16 = (ruduino::config::CPU_FREQUENCY_HZ / 16 / BAUD - 1) as u16;\n\nserial::Serial::new(UBRR)\n    .character_size(serial::CharacterSize::EightBits)\n    .mode(serial::Mode::Asynchronous)\n    .parity(serial::Parity::Disabled)\n    .stop_bits(serial::StopBits::OneBit)\n    .configure();\n```\n\nTransmit a sequence of bytes.\n\n```rust\nfor \u0026b in b\"OK\" {\n    serial::transmit(b);\n}\n```\n\nRead a byte if there's something available.\n\n```rust\nif let Some(b) = serial::try_receive() {\n    serial::transmit(b);\n    serial::transmit(b);\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favr-rust%2Fruduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favr-rust%2Fruduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favr-rust%2Fruduino/lists"}