-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support remote components and turn component manager on #222
Conversation
I finally got back and was able to test this. I see the components are downloaded properly, and are part of the build path, but the This does not line up with esp-idf-sys/src/include/esp-idf/bindings.h Line 183 in 7704c64
and in I'm not sure if it's better to use the "bare" component name in the For reference, from the build logs:
|
Thanks for testing it. Yeah, I noticed this aswell. As far as I see it, we could:
I really don't know how much of an effect these name changes have. And whether there will be more and many. Maybe @ivmarkov knows more? |
Specifically How about just adding |
I think this would be very clear in terms of the It would also make it easy spot new components that are only "remote" and exist for 5.x that don't exist / have to be maintained in 4.4 at all, but still are added to // IDF Provided component.
#ifdef ESP_IDF_COMP_{component}_ENABLED
...
// Component migrated from IDF to remote in 5.x+, but IDF provided in 4.4
#if defined(ESP_IDF_COMP_{component}_ENABLED) || defined(ESP_IDF_COMP_espressif_{component}_ENABLED)
...
// Remote-only component, only available in 5.x+
#ifdef ESP_IDF_COMP_{namespace}_{component}_ENABLED
... |
Allows the component manager to be used without workarounds.
Adds the ability to specify remote components in the Cargo.toml metadata. Adds configuration option `ESP_IDF_COMPONENT_MANAGER` to allow turning the component manager off.
e0cc41a
to
e367e07
Compare
Can confirm that the current brand works as expected if the |
@N3xed, just wanted to make sure you saw the comment over in #231 (comment). It's possible (perhaps likely) I was doing something wrong, but adding this to
Resulted in invalid cfg keys being set (the
This should be set without the version number, but I suspect that's something happening with ESP-IDF. |
Yup, I saw it. Haven't had time to get to it yet, though. I'll investigate this and try to finish the PR next weekend. |
@N3xed Sounds good to me. I was probably "holding it wrong" as you point out. 😄 |
This adds the ability to specify remote components in the Cargo.toml and the esp-idf component manager is now turned on by default, and it will manage all such remote components (specified on the Rust side, or in esp-idf components).
I've changed the template cmake project structure to turn the component manager on. It now uses the normal project setup with
project.cmake
. It should, in theory, work the exact same, though I haven't tested all of it.Remote components make use of the component manager, and its
component_idf.yml
file. All specifiedremote_component
s actually map to equivalent entries in that file.They can be specified with the
remote_component
field in an extra component, e.g.:Note though that
remote_component
does not accept a list. If you want to have multiple remote components, use multiple extra component entries.Other than that, the syntax that @daggerrz suggested in #220 and esp-rs/embuild#78 is still supported, though
component_refs
is nowremote_component
.See the docs for all supported fields (the same as the
dependencies
section in theidf_component.yml
).As I said, some more testing is still needed, it would be appreciated.
Feedback is also appreciated.
Fixes #193