Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@N3xed:
These changes are addressing the TODO (and this issue) where we did not support building the
esp-idf-sys
from mixed Rust/C projects, where the build is driven bycmake
(as opposed tocargo
).The changes are as minimal as it gets, where the only new concept I had to introduce is the notion of
EspIdfComponents
. This was necessary, because the CMake-first builds (unlikePIO-
andnative-
driven cargo-first ones and unlike the PIO-first ones) do NOT by default include all ESP-IDF components as part of the build). Therefore, we needed another set ofcfg
-s - similar in spirit to thekconfig
ones, which are telling us which ESP-IDF components are part of the build. So that we can conditionally include the relevant headers inbindings.h
, as well as use thesecfg
-s downstream to conditionally enable/disable Rust safe wrappers for those components inesp-idf-svc
andesp-idf-hal
.I also took the freedom to move all build files into a
build/
sub-folder, as they grew again a bit.UPDATE: As for the changes necessary for CMake ESP-IDF projects so that these can take advantage of the CMake-first build of
esp-idf-sys
, look here.