Giter Club home page Giter Club logo

esp32-s3-rust-nix's Introduction

ESP32-S3 Rust Development Environment

This is a development environment for the ESP32-s3 board build with nix. It needs the nix.settings.sandbox = "relaxed"; Setting to be toggled as it downloads artifacts at run time from the web.

Getting Started with the Development Environment

Let's get your development environment up and running:

  1. Install Nix Package Manager:

    • You can install the Nix package manager by either downloading the Nix installer or running this command:
      curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

    Afterwards execute the command:

    sudo echo "sandbox = relaxed" >> /etc/nix/nix.conf && sudo systemctl restart nix-daemon.service

    On Windows Subsystem for Linux (WSL) the installer will fail and tell you what to do. Execute the command from the error message and then afterwards execute:

    sudo echo "experimental-features = nix-command flakes" >> '/etc/nix/nix.conf'
  2. Install direnv:

    • Download the direnv package from here or run the following command:
      curl -sfL https://direnv.net/install.sh | bash
  3. Add direnv to your shell:

    echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc && echo 'eval "$(direnv hook bash)"' >> ~/.bashrc && eval "$SHELL"
  4. Clone the Repository and Navigate:

    • Clone this repository and navigate to it.
    • If you are under Windows Subystem For Linux (WSL) please clone the repository to the home folder of your Linux. Do NOT clone it onto your Windows machine!
  5. Allow .envrc:

    • When you enter the directory, you'll receive an error message like this:
      direnv: error .envrc is blocked. Run `direnv allow` to approve its content
    • Execute direnv allow to automatically execute the shell script .envrc when entering the directory.
  6. Set Environment Variables

    • The rust program tries at compile time to read the two environment variables WIFI_SSID and WIFI_PASS
    • Make sure to export them, else you get a compile error. Also start your code editor after having exported these variables else the editor will display these error messages regardless.
    export WIFI_SSID="<Your wifi ssid>"
    export WIFI_PASS="<Your wifi password>"
  7. Open VSCode Workspace

    • There is a VSCode workspace you can open it with
    code esp32-s3-rust-project.code-workspace
  8. Build the Project

    • Go the nes-vcr directory and execute:
    cargo build
    • Or to build and flash directly execute:
    cargo run
    
  9. Open up the Documentation

    • To open the library documentation execute:
    cargo doc --open --package esp-idf-svc
  10. Board Configuration

  1. Related Projects

esp32-s3-rust-nix's People

Contributors

jnthnw avatar qubasa avatar munsman avatar arndttu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.