• Stars
    star
    220
  • Rank 180,422 (Top 4 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 4 months ago

Reviews

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

Repository Details

Tool for installing and maintaining Espressif Rust ecosystem.

espup

Crates.io MSRV Continuous Integration Security audit Matrix

rustup for esp-rs

espup is a tool for installing and maintaining the required toolchains for developing applications in Rust for Espressif SoC's.

To better understand what espup installs, see the installation chapter of The Rust on ESP Book

Requirements

Before running or installing espup, make sure that rustup is installed.

Linux systems also require the following packages:

  • Ubuntu/Debian
    sudo apt-get install -y gcc build-essential curl pkg-config
  • Fedora
    sudo dnf -y install perl gcc
    • perl is required to build openssl-sys
  • openSUSE Thumbleweed/Leap
    sudo zypper install -y gcc ninja make
    

Installation

cargo install espup

It's also possible to use cargo-binstall or to directly download the pre-compiled release binaries.

Commands to install pre-compiled release binaries
  • Linux aarch64
    curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-aarch64-unknown-linux-gnu -o espup
    chmod a+x espup
  • Linux x86_64
    curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-unknown-linux-gnu -o espup
    chmod a+x espup
  • macOS aarch64
    curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-aarch64-apple-darwin -o espup
    chmod a+x espup
  • macOS x86_64
    curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-apple-darwin -o espup
    chmod a+x espup
  • Windows MSVC
    Invoke-WebRequest 'https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-pc-windows-msvc.exe' -OutFile .\espup.exe

Quickstart

See Usage section for more details.

espup install
# Unix
. $HOME/export-esp.sh
# Windows does not require sourcing any file

Warning

The generated export file, by default export-esp, needs to be sourced in every terminal in Unix systems before building an application. On Windows, environment variables are automatically injected into your system and don't need to be sourced.

Usage

Usage: espup <COMMAND>

Commands:
  completions  Generate completions for the given shell
  install      Installs Espressif Rust ecosystem
  uninstall    Uninstalls Espressif Rust ecosystem
  update       Updates Xtensa Rust toolchain
  help         Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Completions Subcommand

Usage: espup completions [OPTIONS] <SHELL>

Arguments:
  <SHELL>  Shell to generate completions for [possible values: bash, elvish, fish, powershell, zsh]

Options:
  -l, --log-level <LOG_LEVEL>  Verbosity level of the logs [default: info] [possible values: debug, info, warn, error]
  -h, --help                   Print help

Install Subcommand

Note

Xtensa Rust destination path

Installation paths can be modified by setting the environment variables CARGO_HOME and RUSTUP_HOME before running the install command. By default, toolchains will be installed under <rustup_home>/toolchains/esp, although this can be changed using the -a/--name option.

Note

GitHub API

During the installation process, several GitHub queries are made, which are subject to certain limits. Our number of queries should not hit the limits unless you are running espup install command numerous times in a short span of time. We recommend setting the GITHUB_TOKEN environment variable when using espup in CI, if you want to use espup on CI, recommend using it via the xtensa-toolchain action, and making sure GITHUB_TOKEN is not set when using it on a host machine. See esp-rs/xtensa-toolchain#15 for more details on this.

Usage: espup install [OPTIONS]

Options:
  -d, --default-host <DEFAULT_HOST>
          Target triple of the host

          [possible values: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-pc-windows-msvc, x86_64-pc-windows-gnu, x86_64-apple-darwin, aarch64-apple-darwin]

  -f, --export-file <EXPORT_FILE>
          Relative or full path for the export file that will be generated. If no path is provided, the file will be generated under home directory (https://docs.rs/dirs/latest/dirs/fn.home_dir.html)

  -e, --extended-llvm
          Extends the LLVM installation.

          This will install the whole LLVM instead of only installing the libs.

  -l, --log-level <LOG_LEVEL>
          Verbosity level of the logs

          [default: info]
          [possible values: debug, info, warn, error]

  -a, --name <NAME>
          Xtensa Rust toolchain name

          [default: esp]

  -n, --nightly-version <NIGHTLY_VERSION>
          Nightly Rust toolchain version

          [default: nightly]

  -s, --std
          Only install toolchains required for STD applications.

          With this option, espup will skip GCC installation (it will be handled by esp-idf-sys), hence you won't be able to build no_std applications.

  -t, --targets <TARGETS>
          Comma or space separated list of targets [esp32,esp32c2,esp32c3,esp32c6,esp32h2,esp32s2,esp32s3,all]

          [default: all]

  -v, --toolchain-version <TOOLCHAIN_VERSION>
          Xtensa Rust toolchain version

  -h, --help
          Print help (see a summary with '-h')

Uninstall Subcommand

Usage: espup uninstall [OPTIONS]

Options:
  -l, --log-level <LOG_LEVEL>  Verbosity level of the logs [default: info] [possible values: debug, info, warn, error]
  -a, --name <NAME>            Xtensa Rust toolchain name [default: esp]
  -h, --help                   Print help

Update Subcommand

Usage: espup update [OPTIONS]

Options:
  -d, --default-host <DEFAULT_HOST>
          Target triple of the host [possible values: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-pc-windows-msvc, x86_64-pc-windows-gnu, x86_64-apple-darwin, aarch64-apple-darwin]
  -l, --log-level <LOG_LEVEL>
          Verbosity level of the logs [default: info] [possible values: debug, info, warn, error]
  -a, --name <NAME>
          Xtensa Rust toolchain name [default: esp]
  -v, --toolchain-version <TOOLCHAIN_VERSION>
          Xtensa Rust toolchain version
  -h, --help
          Print help

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

awesome-esp-rust

Curated list of resources for ESP32 development in the Rust programming language
825
star
2

esp-hal

no_std Hardware Abstraction Layers for ESP32 microcontrollers
Rust
712
star
3

std-training

Embedded Rust on Espressif training material.
Rust
596
star
4

esp-rust-board

Open Hardware with ESP32-C3 compatible with Feather specification designed in KiCad
487
star
5

espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Rust
476
star
6

esp-idf-hal

embedded-hal implementation for Rust on ESP32 and ESP-IDF
Rust
449
star
7

esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
CMake
414
star
8

esp-wifi-sys

Wi-Fi and BT drivers packaged for integration into bare-metal esp-wifi.
Rust
396
star
9

esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
Rust
311
star
10

esp-idf-sys

Bindings for ESP-IDF (Espressif's IoT Development Framework)
Rust
270
star
11

rust-build

Installation tools and workflows for deploying/building Rust fork esp-rs/rust with Xtensa and RISC-V support
PowerShell
249
star
12

esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Rust
193
star
13

book

The Rust on ESP Book
JavaScript
171
star
14

esp8266-hal

A experimental hardware abstraction layer for the esp8266 written in Rust.
Rust
157
star
15

esp-template

A minimal esp-hal application template for use with cargo-generate
Dockerfile
141
star
16

embuild

Build support for embedded Rust: Cargo integration with other embedded build ecosystems & tools, like PlatformIO, CMake and kconfig.
Rust
137
star
17

rfc2217-rs

IETF RFC2217 implementation in Rust
Rust
133
star
18

esp32

Peripheral access crate for the ESP32
Rust
126
star
19

embedded-svc

Rust APIs and abstractions for various embedded services (WiFi, Network, Httpd, Logging, etc.)
Rust
122
star
20

esp-pacs

Peripheral Access Crates for Espressif SoCs and modules
Rust
105
star
21

esp32-wifi

Rust ESP32 WiFi Library
Rust
79
star
22

no_std-training

Getting-started guide on using the Rust with Espressif SoCs using no_std.
Rust
62
star
23

espmonitor

Cargo tool for monitoring ESP32/ESP8266 execution
Rust
48
star
24

esp-openthread

Rust
45
star
25

xtensa-lx-rt

Minimal runtime/startup for Xtensa LX processors
Rust
44
star
26

esp-ieee802154

Low-level IEEE802.15.4 driver for the ESP32-C6 and ESP32-H2
Rust
36
star
27

esp-web-flash-server

Starts a local server serving a web page to flash a given ELF file
Rust
34
star
28

esp-backtrace

backtrace for ESP32 bare-metal
Rust
29
star
29

esp32c3

Peripheral access crate for the ESP32-C3
Rust
28
star
30

xtensa-lx

Low-level access to Xtensa LX processors
Rust
26
star
31

esp-storage

implementation of embedded-storage traits to access unencrypted ESP32 flash
Rust
25
star
32

esp8266

Peripheral access crate for the ESP8266
Rust
22
star
33

esp-riscv-rt

Minimal runtime / startup for RISC-V CPUs from Espressif
Rust
20
star
34

esp-println

Provides print! and println! implementations various Espressif devices
Rust
20
star
35

esp-mbedtls

mbedtls for ESP32 bare-metal
Rust
19
star
36

esp-flasher-stub

Rust implementation of flasher stub located in esptool
Rust
18
star
37

esp-alloc

A simple `no_std` heap allocator for RISC-V and Xtensa processors from Espressif
Rust
15
star
38

esp-flash-loader

A probe-rs flash loader for Espressif chips.
RPC
15
star
39

xtensa-toolchain

A GitHub Action to install the Rust compiler fork targeting Xtensa devices
11
star
40

docker-rust-esp

Rust build environment for the ESP32 and ESP8266
Dockerfile
10
star
41

esp-idf-part

A library for parsing and generating ESP-IDF partition tables
Rust
8
star
42

riscv-atomic-emulation-trap

An atomic emulation trap handler for non atomic RISCV targets
Rust
8
star
43

esp-serial-dbg

esp-serial-dbg - debugging of esp-hal based applications via serial
Rust
7
star
44

esp-rust-board-bsp

A board support package for the ESP Rust Board
Rust
7
star
45

esp-hal-community

Rust
7
star
46

esp-generate

Template generation tool to create no_std applications targeting Espressif's chips.
Rust
6
star
47

xtensa-atomic-emulation-trap

An atomic emulation trap handler for non atomic Xtensa targets
Rust
4
star
48

docs

3
star
49

rfcs

2
star
50

esp32s3

Peripheral access crate for the ESP32-S3
Rust
1
star
51

esp32s2

Rust
1
star
52

repo-activity-digest

Python
1
star