-
Notifications
You must be signed in to change notification settings - Fork 123
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
Time for espidf_time32
?
#280
Comments
t.b.h. I almost never use Rust-std on ESP-IDF 🙈 so my opinion probably shouldn't weight much but I think option A but probably not before July |
I think option A is probably the right call, if users are using IDF versions that are EOL, they need to upgrade. In hindsight, we probably should have had an Regarding the timing, it might be a bit hard to time precisely as we don't have control on a) libc merging b) libc upgrades in rustc. Maybe we get the ball rolling fast, after announcing (in esp-rs? anywhere else?) the plan to only support 5.0 in the future. Users of 4.4 can still use an old compiler (I guess 1.76 might be last supported) to build their 4.4 projects until they upgrade. |
I can agree to that. Though removing the |
You're right, if we're already touching that code, we may as well add the time32 flag. It's better to have the work around there than not at all!
If they are, I would hope that they are taking care of upgrading there esp-idf version before it's EoL or contacting Espressif for an extended support period :D, but again adding the time32 flag is probably a good idea. |
Background
Currently, when compiling for ESP IDF 5+, user needs
RUSTFLAGS="--cfg espidf_time64
in their environment.This is because ESP IDF 5+ migrated to a new GCC toolchain that defines the
time
(val?) type as 64 bit type, whereas in ESP IDF < 5 it is 32 bit. ... and since Rust'slibc
(and by extension - Rust STD) is just a bunch of hard-coded type definitions, completely unaware ofesp-idf-sys
'sbindgen
superpowers, it needs to be explicitly instructed whether it should treattimeval
as 64 bit or 32 bit.Proposal
With ESP IDF 4 getting out of maintenance by middle of this year, I suggest to switch - in a backward incompatible way - how
libc
is compiled. Namely:timeval
as 64 bit, i.e. it should compile itself compatibly with ESP IDF 5. I hope everyone is aligned herelibc
for ESP IDF 4?espidf_time32
which should be present when compilinglibc
for ESP IDF < 5Timing to introduce this change? Might depend on which option is chosen of course.
@MabezDev @jessebraham @bjoernQ @Vollbrecht @igrr
The text was updated successfully, but these errors were encountered: