Closed Song-aff closed 6 months ago
Seems like slint
unconditionally enables portable-atomic/critical-section
here: https://github.com/slint-ui/slint/blob/master/internal/core/Cargo.toml#L58
While for C3 we enable portable-atomic/unsafe-assume-single-core
here: https://github.com/esp-rs/esp-hal/blob/da3375bbe47dcb659353b909fbc556a74bb64cda/esp-hal/Cargo.toml#L109
Given this comment in the portable-atomic:
Therefore, for better performance, if all the critical-section implementation for your target does is disable interrupts, prefer using unsafe-assume-single-core feature instead.
I think for C3 we do the right thing here. Ideally Slint would have this a (default) feature to have a way to opt-out of this
Seems like
slint
unconditionally enablesportable-atomic/critical-section
here: https://github.com/slint-ui/slint/blob/master/internal/core/Cargo.toml#L58While for C3 we enable
portable-atomic/unsafe-assume-single-core
here:Given this comment in the portable-atomic:
Therefore, for better performance, if all the critical-section implementation for your target does is disable interrupts, prefer using unsafe-assume-single-core feature instead.
I think for C3 we do the right thing here. Ideally Slint would have this a (default) feature to have a way to opt-out of this
thank you. Before the official issue in Slint is resolved, would you recommend me to fork the codebase and modify it to use portable-atomic/critical-section for C3, and then reference it?
Before the official issue in Slint is resolved, would you recommend me to fork the codebase and modify it to use portable-atomic/critical-section for C3, and then reference it?
That is probably a good workaround for now
This is a slint issue, as per https://github.com/taiki-e/portable-atomic 's README, libraries should not enable critical-section
etc features themselves.
Closing this, but please file an issue against slint, I'm sure they'd be happy to resolve this on their end :).
When the latest versions of
esp-hal
andslint
are present simultaneously, a compilation error occurs:The error message is as follows: