{"id":50939917,"url":"https://github.com/zbreit/arduino-rust","last_synced_at":"2026-06-17T13:02:25.342Z","repository":{"id":360014618,"uuid":"1247731043","full_name":"zbreit/arduino-rust","owner":"zbreit","description":"Simple examples for teaching myself how to use embedded Rust with my Arduino","archived":false,"fork":false,"pushed_at":"2026-05-24T16:22:56.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T17:07:09.248Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zbreit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2026-05-23T17:48:11.000Z","updated_at":"2026-05-24T16:23:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zbreit/arduino-rust","commit_stats":null,"previous_names":["zbreit/arduino-rust"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zbreit/arduino-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbreit%2Farduino-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbreit%2Farduino-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbreit%2Farduino-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbreit%2Farduino-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbreit","download_url":"https://codeload.github.com/zbreit/arduino-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbreit%2Farduino-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34449283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":[],"created_at":"2026-06-17T13:02:23.526Z","updated_at":"2026-06-17T13:02:25.337Z","avatar_url":"https://github.com/zbreit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arduino-rust\n\nThis repo contains simple examples for teaching myself how to use embedded Rust with my Arduino Uno. I'm running on Arch, so all system install commands will use pacman.\n\n## Setup\n\nFirst, let's install required 3rd-party tools for the AVR cross-compiler:\n\n```bash\nsudo pacman -S avr-gcc avr-binutils avr-libc avrdude\n```\n\nWe'll also have to add a udev rule so that `avrdude` can properly flash the Arduino Uno:\n\n```bash\n# See https://support.arduino.cc/hc/en-us/articles/9005041052444-Fix-udev-rules-on-Linux for\n# more info.\n# Setup a udev rule that grants the user access to the Arduino Uno.\necho 'SUBSYSTEMS==\"usb\",KERNEL==\"ttyACM*\",ATTRS{idVendor}==\"2341\",ATTRS{idProduct}==\"0043\",MODE=\"0666\",TAG+=\"uaccess\"' | sudo tee /etc/udev/rules.d/55-arduino-uno.rules\nsudo chmod 0644 /etc/udev/rules.d/55-arduino-uno.rules\nsudo udevadm trigger\nsudo udevadm control --reload\n```\n\nNext, we have to install the nightly Rust compiler, which gives us access to the `avr-none` target. See [rustc's docs on `avr-none`](https://doc.rust-lang.org/nightly/rustc/platform-support/avr-none.html) for more info on this build target.\n\n```bash\nrustup toolchain install nightly\nrustup override set nightly\n```\n\nNext let's setup [ravedude](https://github.com/Rahix/avr-hal/blob/main/ravedude/README.md): a Rust \"runner\" that will automatically flash the Arduino using `avrdude` every time we call `cargo run`. Install it with the following command:\n\n``bash\ncargo +stable install --locked ravedude\n```\n\nNow, you can configure your target architecture, CPU, and runner behavior in `.cargo/config.toml`.\n\nYou likely have to build with `cargo run --release` since the ROM size on the atmega328p is fairly small.\n\n## Setup with avr-hal\n\nTo use `avr-hal`, the simplest way to setup is to use `cargo-generate`. First, we have to install it.\n\n```bash\n# I had to use the `--locked` arg due to the following error: error[E0433]: cannot find `rhai` in the crate root\ncargo install cargo-generate\n```\n\nFinally, we can build a project based on the template:\n\n```bash\ncargo generate --git https://github.com/Rahix/avr-hal-template.git\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbreit%2Farduino-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbreit%2Farduino-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbreit%2Farduino-rust/lists"}