esp-idf-svc has a bunch of cfg flags, eg esp_idf_comp_esp_netif_enabled, that normally get set by some automatic process I don't understand.
This doesn't work with cmake projects from this template. If you:
create a std project called "test" with cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cmake
add esp-idf-svc = "0.42.5" to components/rust-test/Cargo.toml
add use esp_idf_svc::netif; to components/rust-test/src/lib.rs
then you get this error:
error[E0432]: unresolved import `esp_idf_svc::netif`
--> src/lib.rs:2:5
|
2 | use esp_idf_svc::netif;
| ^^^^^^^^^^^^^^^^^^ no `netif` in the root
If you brute-force it, by adding set(ESP_RUSTFLAGS "--cfg esp_idf_comp_esp_netif_enabled") to components/rust-test/CMakeLists.txt, then this shifts the error onto other missing flags (such as esp_idf_comp_esp_event_enabled).
Thanks for all your work on esp-rs!
esp-idf-svc has a bunch of cfg flags, eg esp_idf_comp_esp_netif_enabled, that normally get set by some automatic process I don't understand.
This doesn't work with cmake projects from this template. If you:
cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cmake
esp-idf-svc = "0.42.5"
tocomponents/rust-test/Cargo.toml
use esp_idf_svc::netif;
tocomponents/rust-test/src/lib.rs
then you get this error:
If you brute-force it, by adding
set(ESP_RUSTFLAGS "--cfg esp_idf_comp_esp_netif_enabled")
tocomponents/rust-test/CMakeLists.txt
, then this shifts the error onto other missing flags (such asesp_idf_comp_esp_event_enabled
).Any ideas?