Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
/ docker-rust-esp Public archive

Rust build environment for the ESP32 and ESP8266

Notifications You must be signed in to change notification settings

esp-rs/docker-rust-esp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

docker-rust-esp

Provides a Dockerfile defining a Rust build environment for the ESP32 and ESP8266. Builds LLVM and Rust with support for the Xtensa ISA.

For more information on the Xtensa Rust toolchain, refer to the following repositories:
https://github.com/esp-rs/rust
https://github.com/MabezDev/xtensa-rust-quickstart

Building

Ensure that Docker is installed on your system. At least 4GB of RAM (6GB+ recommended) should be available to the container; too little memory can cause the build to fail. Note that this process can be lengthy, potentially taking hours depending on your hardware. Please be patient.

To build the image (tagging it with the name rust-esp):

$ git clone https://github.com/esp-rs/docker-rust-esp.git
$ cd docker-rust-esp/
$ docker build -t rust-esp .

Usage

Once the image has been built, from the root directory of your project (ie. that containing Cargo.toml), run:

$ docker run -v $PWD:/project --rm rust-esp

This will build the application using xargo in release mode, targeting the architecture specified in your .cargo/config file.

https://github.com/japaric/xargo

Alternatively if you would prefer an interactive session:

$ docker run -v $PWD:/project -it --rm rust-esp /bin/bash