Follow https://github.com/esp-rs/rust-build installation
Install esp-idf : https://github.com/espressif/esp-idf
cargo install -f ldproxy espflash espmonitor
cargo build
espflash /dev/ttyUSB0 target/xtensa-esp32-espidf/debug/rust-esp32-waveshare-4_2
https://docs.rs/epd-waveshare/latest/epd_waveshare/
https://github.com/esp-rs/esp-idf-hal
Thanks ivmarkov for the simplest example on how to build and flash rust on ESP32 and all dependancy crate maintainer