allow string.c to be disabled when it conflicts with other libs#15
allow string.c to be disabled when it conflicts with other libs#15liebman wants to merge 2 commits intotrussed-dev:mainfrom
Conversation
|
Having features that disable code is somewhat counter-intuitive for me. But I’m not sure if a positive feature that enables |
|
I have no preference - as long as there is control as to where these functions come from. |
|
From the Cargo book
Another solution would be to expect the user to always bring their own implementation. This is only matters for embedded so it's not shocking. |
Thats fine too. One can always use to bridge the gap. |
|
I don’t see |
|
Your correct :-( |
|
In that case I would vote for keeping the functions in |
|
That works for me. |
|
I'll open an issue on |
|
|
|
I would still keep a feature flag that brings in |
There are other crates that are based on C libs and define various functions like
strchr. This PR adds a feature that when enabled does not compilestring.cand expects some external source to provide the functions within.I ran into this issue with the current (unreleased)
esp-wifithat when combined with littlefs2 fails to link becausestrchris multiply defined.When combining crates that do this one can disable
string.cand if needed add this to fill in any functions that are still missing: