{"id":13670966,"url":"https://github.com/ctron/rust-esp-container","last_synced_at":"2025-07-16T11:06:30.465Z","repository":{"id":140053271,"uuid":"191695677","full_name":"ctron/rust-esp-container","owner":"ctron","description":"Container image with pre-built rust compiler for ESP32/ESP8266","archived":false,"fork":false,"pushed_at":"2020-10-20T19:11:04.000Z","size":39,"stargazers_count":182,"open_issues_count":11,"forks_count":20,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-16T01:13:25.967Z","etag":null,"topics":["container","esp32","esp8266","rust"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.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}},"created_at":"2019-06-13T05:21:52.000Z","updated_at":"2025-01-06T19:56:20.000Z","dependencies_parsed_at":"2024-01-14T15:24:50.072Z","dependency_job_id":"a4f8ec1d-0a8b-4522-9c01-0084f15ab95d","html_url":"https://github.com/ctron/rust-esp-container","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ctron/rust-esp-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Frust-esp-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Frust-esp-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Frust-esp-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Frust-esp-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/rust-esp-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Frust-esp-container/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259767395,"owners_count":22908193,"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":["container","esp32","esp8266","rust"],"created_at":"2024-08-02T09:00:54.452Z","updated_at":"2025-06-14T05:33:28.888Z","avatar_url":"https://github.com/ctron.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"# Rust ESP compiler container [![Repository on Quay](https://img.shields.io/badge/quay.io-ctron%2Frust--esp-success \"Repository on Quay\")](https://quay.io/repository/ctron/rust-esp)\n\nThis is a container which can be used to build a Rust project for the ESP32.\n\n## Pre-requisites\n\n  * Docker\n  * A rust project (e.g. use [ctron/rust-esp-template](https://github.com/ctron/rust-esp-template) as example)\n\n## Usage\n\nThis container image provides a few tools which can be run like this:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp:latest\n\nThis uses `-ti` to attach the console, to show you the output and let you interact\nwith the application running inside the container.\n\n**Note**: Consider running the container with `--rm` as well. This prevents Docker\n          from keeping the container around after it exited. As all your sources are\n          mapped from the host's file system into the container, you don't need to\n          keep the container on disk, and can safe some disk storage.\n\n### Volume mapping\n\nThe `-v $PWD:/home/project:z` will map the current directory into the location\n`/home/project` inside the container. This is required so that the tools inside\nthe container can work with the project.\n\n`$PWD` gets replaced by the shell with the current directory. This will only work\nin a Bourne like shell. On Windows you can use `%CD%` instead. You can of course\nalso replace this with the absolute path to your project.\n\nYou can drop the `:z` suffix, if you don't have SElinux on the host system.\n\nAll following examples use `$PWD:/home/project:z`, replace this as required by your environment.\n\n### Default command\n\nThis will run the default command `build-project`. This will try an automic full build, see below.\n\nYou can run other commands by providing a command manually:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp my-command-in-the-container\n\n### Running as shell\n\nAs you can run other commands, and the container is just a normal Linux, you can simply run `bash`\nin the container and directly work there. Without the need to run docker with each command:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp bash\n\n### Tags\n\nThe `master` branch of this repository will build into the `latest` tag, which is also the default\nif you omit the `:latest` suffix in the container name.\n\nEach git tag will also be build into a container image tag, so e.g. git tag `0.0.1`, will be built into\nthe container tag `:0.0.1`.\n\nSo should the `latest` image break, it should always be possible to switch to a previous version.\n\nThere is also the `:develop` tag, which is based on the `develop` branch in Git. It is used to try\nout new changes before merging into master.\n\n## Bootstrapping\n\nInitially a few files need to be set up. The ESP-IDF components need to be configured and compiled.\nRun the following command to create an initial setup:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp create-project\n\nThis will create (overwrite) a few files, which are required to build the project.\n\nNext run:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp make menuconfig\n\nWhich will start the ESP-IDF build and shows you the menu config tool for configuring\nyour ESP project. Be sure to save when you exit.\n\n## Building\n\nIn order to build the project, run the following command:\n\n    docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp build-project\n\nThis will compile the ESP-IDF part, the rust part and finally convert it to an image\nwhich you can upload to your ESP.\n\n## Uploading\n\nYou can then upload the image using the `flash-project` executable:\n\n    docker run -ti --device=/dev/ttyUSB0 -v $PWD:/home/project:z rust-esp32 flash-project\n\nIf this doesn't work or you need to use differnt tool it might be easier to\nupload the image via `esptool` from the host machine. To do this call:\n\n    esptool write_flash 0x10000 esp-app.bin\n\n## Building the container\n\nYou can also build the container image yourself, by cloning this repository and executing:\n\n    docker build . -t rust-esp\n\n## Notes\n\n  * Use this at your own risk. No guarantees.\n  * Contributions are welcome.\n  * This /should/ work on MacOS the same way. But I haven't tested it.\n  * A test on Windows shows that, yes it works. But with some quirks:\n    * The menu `make menuconfig` renders a bit weird. The new Windows terminal improves this a lot.\n    * The first `make app` will run just fine, but after that it fails to compile. Maybe some\n      issue with the Windows CIFS mapping in Docker. However, you can skip this step and run `xbuild-project`\n      instead. That will only compile the rust part.\n  * In theory this should work also with with the ESP8266. A few tweaks for the build files\n    will be required, and I didn't test this.\n  * I put this on [quay.io](https:/quay.io) as Docker Hub continously failed to build this\n    image. After several hours, the build times out. As quay.io now runs out of disk space during\n    the build, I started building this with GitHub Actions, and then push it to quay.io.\n\n## Also see\n\nThis work is built upn the work of others. Please see:\n\n  * http://quickhack.net/nom/blog/2019-05-14-build-rust-environment-for-esp32.html\n  * https://esp32.com/viewtopic.php?t=9226\n  * https://github.com/MabezDev/rust-xtensa\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Frust-esp-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Frust-esp-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Frust-esp-container/lists"}