Comments (6)
esp-rs/esp-hal#1434 (comment)
I also raised this question in ESP-HAL
from slint.
Looks like we shouldn't unconditionally require critical-section in
slint/internal/core/Cargo.toml
Line 58 in a61ca93
from slint.
Any plan to fix this? It's really annoying that need to patch esp-hal
as a workaround in order to use slint. Really thankful if this could be fixed 🙂.
from slint.
Not sure how to fix this.
We can't just remove the features = ["critical-section"]
from our Cargo.toml, otherwise things will stop compiling.
Even if we add unsafe-single-threaded = ["portable-atomic/unsafe-assume-single-core"]
in our own Cargo.toml this won't work on stm32
from slint.
@ogoffart what if we follow the portable-atomic
crate recommendation? Leave the end user to determine which feature to use, features = ["critical-section"]
or features = ["unsafe-assume-single-core"]
. We remove features = ["critical-section"]
, and add an slint feature let's say critical-section
, and bind portable-atomic/critical-section
. Full change may like:
unsafe-single-threaded = ["portable-atomic/unsafe-assume-single-core"]
critical-section = ["portable-atomic/critical-section"]
And user could choose one of them to use.
Update:
There may some HAL use critical-seciton
in protable-atomic
, but user may still need use unsafe-single-threaded
in slint. So we may need change like:
unsafe-single-threaded = []
portable-atomic-single-core = ["portable-atomic/unsafe-assume-single-core"]
portable-atomic-critical-section = ["portable-atomic/critical-section"]
A breaking and clumsy change, but I can't see any other solution. : (
from slint.
I guess you're right. We can make it non-breaking by using the compat-1-2 feature.
In api/rs/slint/Cargo.toml
unsafe-single-threaded = []
portable-atomic-single-core = ["portable-atomic/unsafe-assume-single-core"]
portable-atomic-critical-section = ["portable-atomic/critical-section"]
compat-1-2 = ["portable-atomic-critical-section", "compat-1-7"]
compat-1-7 = []
in internal/core/Cargo.toml
portable-atomic = { version = "1", features = ["require-cas"] }
But we also need to document that properly.
(This just makes it even more complicated to setup for MCU apps)
from slint.
Related Issues (20)
- Proposal: Styling capabilities for the std-widgets HOT 12
- !! A panic occured in 'i-slint-core-1.6.0\software_renderer.rs', at line 2460, column 9: not yet implemented HOT 2
- [FEATURE REQUEST] ability to add structs as fields of structs HOT 2
- TextEdit with qt style cannot be selected
- set_fullscreen(false) is invalid HOT 2
- [Bug] Component highlighting in the Slint preview doesn't work in a PopupWindow."
- Wrong transition animation when values indirectly updated right before start HOT 5
- Panic in slint compiler: The remove return pass should have removed all return HOT 2
- Showing two windows at once on Winit/Skia on Wayland/GNOME causes one to be incorrectly painted initially
- When opening multiple windows on Wayland/Winit, it's not possible to close them separately HOT 1
- `LineEdit`: Can not select text with the mouse HOT 1
- Can't bring global to Rust scope HOT 2
- LinuxKMS: Finish linux framebuffer support
- The button component cannot be displayed in Chinese HOT 4
- Small proposal, hope Slint gets better and better HOT 1
- random svg path preview HOT 4
- (Question) Does the program executable is standalone?
- Multiple component in the interpreter HOT 2
- Document global behavior with several instance of components.
- LLR-based interpreter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slint.