espressif / rust-esp32-example

Example of Rust integration into an ESP-IDF project, for ESP32 series of chips
MIT License
440 stars 36 forks source link

run cargo from CMake, remove hardcoded target from .cargo/config #5

Closed igrr closed 3 years ago

igrr commented 3 years ago

The call to Cargo is now executed via ExternalProject_Add CMake function. idf.py build now builds the IDF app, Rust subproject, and links the two. The target type is passed to Cargo via an environment variable, removing the need for a hardcoded target in .cargo/config.

Closes https://github.com/espressif/rust-esp32-example/issues/2 Closes https://github.com/espressif/rust-esp32-example/issues/4

Also remove sdkconfig file, adding it to gitignore. Any project-specific settings can be added to sdkconfig.defaults.

igrr commented 3 years ago

Making this draft since the current instructions (run Cargo before idf.py set-target) will not work anymore. Will push the change for #4 and update the docs.