HipsterBrown / xs-dev

The quickest way for getting started with JS on devices
https://xs-dev.js.org
MIT License
37 stars 13 forks source link

feat: experiment with espflash to replace esptool.py #132

Open HipsterBrown opened 1 year ago

HipsterBrown commented 1 year ago

Mostly due to my inexperience with managing Python versions and the recent build error issues related to 3.11 with the esp-idf, I'd like to consider replacing the Python-related Espressif tooling with the Rust-based alternatives:

https://github.com/esp-rs/espflash

Even looking at integrating with the idf-env tool from Espressif to manage the installation of the SDK. https://github.com/espressif/idf-env

This work would be behind a "feature flag" (either an env variable or CLI option), since it would probably require some extra complexity to just build a project with mcconfig and execute the flashing with espflash after.

The main risk with this approach is lagging support for newer chips as esp-rs is a community group, not official tooling from Espressif. However, it does offer an opportunity for a stable binary dependency that could eventually be integrated as a native binding to Node.js to avoid exec-ing through the user shell.

phoddie commented 1 year ago

I'm not sure that will eliminate the Python dependency as there are other Python scripts that are integral to the ESP-IDF build.