• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Dockerfile
  • License
    Eclipse Public Li...
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Container image with pre-built rust compiler for ESP32/ESP8266

Rust ESP compiler container Repository on Quay

This is a container which can be used to build a Rust project for the ESP32.

Pre-requisites

Usage

This container image provides a few tools which can be run like this:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp:latest

This uses -ti to attach the console, to show you the output and let you interact with the application running inside the container.

Note: Consider running the container with --rm as well. This prevents Docker from keeping the container around after it exited. As all your sources are mapped from the host's file system into the container, you don't need to keep the container on disk, and can safe some disk storage.

Volume mapping

The -v $PWD:/home/project:z will map the current directory into the location /home/project inside the container. This is required so that the tools inside the container can work with the project.

$PWD gets replaced by the shell with the current directory. This will only work in a Bourne like shell. On Windows you can use %CD% instead. You can of course also replace this with the absolute path to your project.

You can drop the :z suffix, if you don't have SElinux on the host system.

All following examples use $PWD:/home/project:z, replace this as required by your environment.

Default command

This will run the default command build-project. This will try an automic full build, see below.

You can run other commands by providing a command manually:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp my-command-in-the-container

Running as shell

As you can run other commands, and the container is just a normal Linux, you can simply run bash in the container and directly work there. Without the need to run docker with each command:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp bash

Tags

The master branch of this repository will build into the latest tag, which is also the default if you omit the :latest suffix in the container name.

Each git tag will also be build into a container image tag, so e.g. git tag 0.0.1, will be built into the container tag :0.0.1.

So should the latest image break, it should always be possible to switch to a previous version.

There is also the :develop tag, which is based on the develop branch in Git. It is used to try out new changes before merging into master.

Bootstrapping

Initially a few files need to be set up. The ESP-IDF components need to be configured and compiled. Run the following command to create an initial setup:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp create-project

This will create (overwrite) a few files, which are required to build the project.

Next run:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp make menuconfig

Which will start the ESP-IDF build and shows you the menu config tool for configuring your ESP project. Be sure to save when you exit.

Building

In order to build the project, run the following command:

docker run -ti -v $PWD:/home/project:z quay.io/ctron/rust-esp build-project

This will compile the ESP-IDF part, the rust part and finally convert it to an image which you can upload to your ESP.

Uploading

You can then upload the image using the flash-project executable:

docker run -ti --device=/dev/ttyUSB0 -v $PWD:/home/project:z rust-esp32 flash-project

If this doesn't work or you need to use differnt tool it might be easier to upload the image via esptool from the host machine. To do this call:

esptool write_flash 0x10000 esp-app.bin

Building the container

You can also build the container image yourself, by cloning this repository and executing:

docker build . -t rust-esp

Notes

  • Use this at your own risk. No guarantees.
  • Contributions are welcome.
  • This /should/ work on MacOS the same way. But I haven't tested it.
  • A test on Windows shows that, yes it works. But with some quirks:
    • The menu make menuconfig renders a bit weird. The new Windows terminal improves this a lot.
    • The first make app will run just fine, but after that it fails to compile. Maybe some issue with the Windows CIFS mapping in Docker. However, you can skip this step and run xbuild-project instead. That will only compile the rust part.
  • In theory this should work also with with the ESP8266. A few tweaks for the build files will be required, and I didn't test this.
  • I put this on quay.io as Docker Hub continously failed to build this image. After several hours, the build times out. As quay.io now runs out of disk space during the build, I started building this with GitHub Actions, and then push it to quay.io.

Also see

This work is built upn the work of others. Please see:

More Repositories

1

kill-kube-ns

Kill a Kubernetes namespace suffering from being stuck in "Terminating"
Shell
144
star
2

patternfly-yew

PatternFly components for Yew
Rust
97
star
3

org.openscada.utgard

OpenSCADA Utgard
79
star
4

rpm-builder

Maven RPM builder plugin
Java
55
star
5

yew-oauth2

General purpose OAuth2 component for Yew
Rust
42
star
6

package-drone

An OSGI first software artifact repository – Moved to the Eclipse Foundation
Java
39
star
7

pem-keystore

A PKCS #1 PEM KeyStore for Java
Java
33
star
8

org.openscada.atlantis

OpenSCADA Atlantis
28
star
9

colored_json

Generating colored JSON in Rust
Rust
27
star
10

milo-ece2017

Materials about my talk around Eclipse Milo at EclipseCon Europe 2017
Java
22
star
11

rust-esp-template

Rust ESP32 project template
Rust
21
star
12

openshift-update-graph

Visualize the OpenShift Update Graph
HTML
20
star
13

rust-esp32-hono

HTTP with Rust on ESP32
Rust
18
star
14

patternfly-yew-quickstart

A Patternfly for Yew quickstart repository
Rust
14
star
15

de.dentrassi.elasticsearch.log4j2-mock

Log4J2 mock adapter for using with Elasticsearch 5.x/6.x
Java
13
star
16

de.dentrassi.camel.utgard

OPC DA component for Apache Camel
Java
13
star
17

operator-framework

Tools and helper for creating Kubernetes operators in Rust
Rust
11
star
18

esp-idf-alloc

Rust allocator for ESP-IDF
Rust
9
star
19

eclipse-hawkbit-arduino-ota-client

An Eclipse Hawkbit OTA client for Arduino
C++
8
star
20

kura-container

An containerized Eclipse Kuraâ„¢ instance
Dockerfile
8
star
21

kapua-gateway-client

A Gateway Client SDK for Eclipse Kapuaâ„¢
Java
8
star
22

package-drone-openshift

Open Shift cartridge for Package Drone
HTML
7
star
23

hat

Eclipse Honoâ„¢ Admin Tool
Rust
7
star
24

de.dentrassi.camel.milo

This component is now available in Camel 2.19.0
Java
7
star
25

browser-panic-hook

A panic hook for frontend applications
Rust
7
star
26

yew-nested-router

A router for Yew supporting nesting
Rust
7
star
27

hagen

A static web page generator, written in Rust
Rust
7
star
28

org.eclipse.4diac.forte

fork of https://git.eclipse.org/c/4diac/org.eclipse.4diac.forte.git/
C++
7
star
29

kura-addons

Addons for Eclipse Kuraâ„¢
Java
6
star
30

libreoffice-online-k8s

LibreOffice Online for Kubernetes
Shell
6
star
31

osgi-dp

Maven plugin for creating OSGi deployment packages
Java
6
star
32

asyncapi

Tools around AsyncAPI
Java
6
star
33

ece2019-iot-playground

Playing around with IoT @ EclipseCon Europe 2019
5
star
34

popper-rs

Popper bindings for Rust
JavaScript
5
star
35

wmisample

A WMI Query Sample using Eclipse SWT
Java
5
star
36

kura-examples

A set of examples around Eclipse Kuraâ„¢
Java
5
star
37

openshift-openapi

OpenShift API for Rust
Rust
5
star
38

hono-simulator

Simulating IoT payloads for Eclipse Hono
Java
5
star
39

osgiee

Recipes for modular EE applications based on OSGi
Java
4
star
40

hono-demo-1

Full stack example of Eclipse Hono, Eclipse Che, EnMasse on OpenShift
Java
4
star
41

hcloud-okd-setup

Simple OKD setup for Hetzner Cloud
Shell
4
star
42

csaf-walker

A library and CLI to work with CSAF an SBOM data
JavaScript
4
star
43

markdown-test-report

A cargo test report in markdown
Rust
3
star
44

oidc-cli

A command line tool to work with OIDC tokens
Rust
3
star
45

package-drone-jenkins

A Package Drone Plugin for Jenkins
Java
3
star
46

ditto-operator

A Kubernetes Operator for Eclipse Dittoâ„¢
Rust
3
star
47

iot-simulator-operator

Kubernetes operator for the IoT simulator
Go
3
star
48

hawkbit-operator

A Kubernetes operator for Eclipse Hawkbit
Rust
3
star
49

cve

Mappings of the CVE JSON structures for Rust
Rust
3
star
50

hono-kafka-bridge

Eclipse Hono example bridge to Kafka
Java
3
star
51

yew-router

A fork of yew-router
Rust
2
star
52

streamsheets-kubernetes

Providing a reasonable way to use Eclipse Streamsheets on Kubernetes
Dockerfile
2
star
53

ansible-mastodon-setup

An Ansible based setup for a Mastodon instance
Jinja
2
star
54

eclipse-iot-recipes

Recipes for deploying Eclipse IoT as an integrated solution
Ruby
2
star
55

simulating-iot

Simulating IoT gateways for fun and profit
Shell
2
star
56

de.dentrassi.iot

A few Java IoT components
Java
2
star
57

package-drone-ece2015

Java
2
star
58

podium

Watch your pods
Rust
2
star
59

eclipse_scada_book

The Eclipse SCADA Book
XSLT
2
star
60

iot-simulator-console

Web Console for the IoT simulator
Go
2
star
61

sikula

A simple query language
Rust
2
star
62

hono-kafka-bridge-quarkus

Hono example bridge – Quarkus style
Java
2
star
63

de.dentrassi.camel.iec60870

An Apache Camel component for IEC 60870
Java
2
star
64

package-drone-book

This way up!
XSLT
2
star
65

eclipse-scada-ngp-dissector

A wireshark dissector for the Eclipse SCADA NGP protocol stack
C
2
star
66

kura-simulator

A simulator framework for Eclipse Kuraâ„¢
Java
2
star
67

homeassistant-agent

A crate for implementing MQTT-based Home Assistant integrations
Rust
2
star
68

patternfly-yew-demo

Rust
1
star
69

elfsign

Signing elf files, not to be confused with singing elves
Rust
1
star
70

eclipsecon-2022-rust-embedded

HTML
1
star
71

monaco-editor-textmate-web

A helper to register TextMate grammars with the Monaco Code Editor in Rust
Rust
1
star
72

trunk-container

A container for building with WASM frontends with trunk
Dockerfile
1
star
73

de.dentrassi.camel.unide

Eclipse Unideâ„¢ Camel integration
Java
1
star
74

hot

Command line test tool for Eclipse Hono
Go
1
star
75

de.dentrassi.camel.neoscada

Eclipse NeoSCADA Camel Adapter
Java
1
star
76

iofog-kubernetes

Deploying ioFog on Kubernetes
Dockerfile
1
star
77

reqwest-wasm-ext

Extension for reqwest on wasm targets
Rust
1
star
78

kura-build

Containerized builder for Eclipse Kura
Shell
1
star
79

hono-dev

Developer tools for Eclipse Hono
Dockerfile
1
star
80

hono-example-demo-gauge

TypeScript
1
star
81

hag-website

The source for the homepage
HTML
1
star
82

kapua-sandbox-server

Eclipse Kapuaâ„¢ sandbox server setup
1
star
83

streamsheets-openshift

1
star
84

iot-simulator-example

Example deployment for EnMasse with Hono and the IoT Simulator
1
star
85

keycloak-crd

Rust custom resource types for Keycloak
Rust
1
star
86

flexible-time

A library to parse timestamps in a flexible format
Rust
1
star
87

web-graph

A WebAssembly based web view for showing graphs
Rust
1
star
88

analytics-next-rs

Rust wrapper for @segment/analytics-next the web
JavaScript
1
star
89

amq-online-example-iot-weather

HTML
1
star
90

elkato-frontend

Rust
1
star
91

mkat

Mark Kirchseeoner Auto-Teiler e.V.
HTML
1
star
92

quarkus-repro-1

HTML
1
star
93

girls-day

Source code for Girls'Day tutorials
C++
1
star
94

apt-repo

APT Repository Generator
Java
1
star
95

cayenne-lpp

A Cayenne LPP library for Java
Java
1
star
96

asyncapi-maven

AsyncAPI Maven Plugin
Java
1
star
97

seedwing-demo-quarkus-maven

Java
1
star
98

asciidoctor-web

Asciidoctor.js bindings for Rust
JavaScript
1
star
99

shields

Serving shields for Eclipse Foundation projects
Java
1
star
100

embedded-serial-bridge

Rust
1
star