{"id":13612552,"url":"https://github.com/jhaand/rust4mch","last_synced_at":"2026-03-06T19:23:49.496Z","repository":{"id":37803279,"uuid":"494772976","full_name":"jhaand/rust4mch","owner":"jhaand","description":"Example to run Rust code on the MCH2022 badge.","archived":false,"fork":false,"pushed_at":"2024-06-17T19:59:26.000Z","size":442,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T23:46:18.457Z","etag":null,"topics":["badge","badgelife","esp-rs","esp32","esp32-wroom","ili941","mch2022","rust"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhaand.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}},"created_at":"2022-05-21T12:11:06.000Z","updated_at":"2024-06-17T19:59:29.000Z","dependencies_parsed_at":"2024-11-07T20:43:48.592Z","dependency_job_id":null,"html_url":"https://github.com/jhaand/rust4mch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhaand%2Frust4mch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhaand%2Frust4mch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhaand%2Frust4mch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhaand%2Frust4mch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhaand","download_url":"https://codeload.github.com/jhaand/rust4mch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714627,"owners_count":21149928,"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":["badge","badgelife","esp-rs","esp32","esp32-wroom","ili941","mch2022","rust"],"created_at":"2024-08-01T20:00:31.505Z","updated_at":"2026-03-06T19:23:49.462Z","avatar_url":"https://github.com/jhaand.png","language":"Python","funding_links":[],"categories":["Projects"],"sub_categories":["`std`"],"readme":"# Rust on the MCH2022 badge\nThis repo contains instructions and code to run Rust on the MCH2022 badge.\n\n- [Install the toolchains in your host machine]\n\nIt also contains [instructions and recommendations on how to start a new project](#creating-your-own-project).\n\n## Installing the toolchains\nInstall the Rust toolchain for ESP, see full [instructions here](https://github.com/esp-rs/rust-build#xtensa-installation)\n1. Install the prerequisites\n   - [Linux](https://github.com/esp-rs/rust-build#prerequisites)\n   - MacOs: No prerequisites are needed\n2. Clone the repository or [download the installer](https://github.com/esp-rs/rust-build#download-installer)\n   - If downloading the installer, make it executable: `chmod a+x install-rust-toolchain.sh`\n3. Run the following command:\nrequire(\"core\")\n   - Linux/MacOs:\n        ```bash\n        ./install-rust-toolchain.sh \\\n        --extra-crates \"cargo-espflash ldproxy\" \\\n        --clear-cache \"YES\" --export-file ~/export-esp.sh \\\n        --esp-idf-version \"release/v4.4\" \\\n        --minified-esp-idf \"YES\" \\\n        --build-target \"esp32\"\n        ```\n4. Update the environment variables as told at the end of the installation script.\n5. Keep a copy of the MCH2022 webusb tools close by in the same directory as this project. \n   Clone it from: https://github.com/badgeteam/mch2022-tools\n\n## Build\n```\ncargo espflash save-image ESP32 rust4mch.img \n```\nOr run the `build.sh` script. \n\n## Flash\n```\n../mch2022-tools/webusb_push.py rust4mch rust4mch.img\n```\nOr run the `upload.sh` script\n\n# Inspiration\n\n## Official Badge.team documentation\nThe official process for the badge can be found here. \nhttps://www.badge.team/docs/badges/mch2022/software-development/rust/\n\nIt provides a simple 'hello world' example over serial and a more advanced example. \n\n### Std\n\nUse [esp-idf-template](https://github.com/esp-rs/esp-idf-template) as starting point:\n```bash\ncargo generate  https://github.com/esp-rs/esp-idf-template\n```\n`cargo-generate` will as you a few questions, after those, you will have a \"Hello, world!\"\nRust binary crate for the ESP-IDF framework.\n\nAnswer the questions as follows:\n - STD support: YES\n - Release: 4.4\n - MCU: ESP32\n - Dev containers: NO \n\n### No-Std\n\nUse [esp-template](https://github.com/esp-rs/esp-template) as starting point:\n```bash\ncargo generate  https://github.com/esp-rs/esp-template\n```\n`cargo-generate` will as you a few questions, after those, you will have a bare-metal\nminimalist project!\n\n## Hello world example \n\nThis project added a minimal hello world example in the `examples` directory. \nYou can run it as follows:\n```\ncargo build --example hello_world\ncd target/xtensa-esp32-espidf/debug/examples/\nesptool.py --chip esp32 elf2image hello_world\n```\nReset the badge. Connect a serial program to /dev/ttyACM0 at 115k2 baud. \nAfter that you can navigate to the apps and run the app. \n\n## Rust on ESP32 STD Demo App\nThe best example on useing std Rust on the ESP32 can be found here. It uses a lot of peripheral and protocols. \n\nhttps://github.com/ivmarkov/rust-esp32-std-demo.git\n\n```\ngit clone https://github.com/ivmarkov/rust-esp32-std-demo.git\ncd rust-esp32-std-demo/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhaand%2Frust4mch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhaand%2Frust4mch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhaand%2Frust4mch/lists"}