-
Notifications
You must be signed in to change notification settings - Fork 644
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
Second round of changes to the MCU docs #1624
Conversation
... because that's what it really is :-)
Usually "in order to" just becomes "to", but here it makes most sense to just name the requirement first. Also removed the bold from "nightly" as there's no other use of bold in this doc, it looks a little out of place.
Refer to the source of the features
* Fix persona (we selected the feature) * Use the blog title for the link to the blog.
Tell what is okay, not what is not okay.
Refere to it in regular double quotes, like earlier. This could also be swapped to use a back tick, but then it should be done in both places.
First say why we select the feature, then provide background. Makes it easier to skim.
Providing the code snippet first and then the explanation makes it much easier to read.
Each tasks "receives", "reacts" or "renders.
Every operating system provides the primitives, in reality.
…e event loop It's not something that'll happen in the future :-)
by referring to crates as missing.
This emphasizes the time difference better
There's already a lot of "driving" in that section.
api/rs/slint/mcu.md
Outdated
This feature is only available in the Rust Standard Library (std), but is not available in bare metal environments. As a fallback, the `unsafe-single-threaded` | ||
feature changes Slint to use unsafe static for storage. This way, you guarantee to use Slint API only from the main thread, or from interrupt handlers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is only available in the Rust Standard Library (std), but is not available in bare metal environments. As a fallback, the `unsafe-single-threaded` | |
feature changes Slint to use unsafe static for storage. This way, you guarantee to use Slint API only from the main thread, or from interrupt handlers. | |
This macro is only available in the Rust Standard Library (std), not in bare metal environments. As a fallback, the `unsafe-single-threaded` | |
feature changes Slint to use unsafe static for storage. By selecting this feature, you must ensure that you only use | |
the Slint API from a single thread and not from interrupt handlers. |
The sense of the sentence was changed: It is not possible to use slint from interrupt handlers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove the redundant "available" (well spotted).
Well spotted about the change of meaning!
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest rewording
…ly version They might settle on a different API, but the possibility is key here.
That's very broad :-) |
In order to set a global allocator, required by Slint, you will need a **nightly** version of Rust. This is due to the fact that the support for using a custom global allocator in a bare metal | ||
environment with `#![no_std]` has not been stabilized yet (see [#51540](https://github.com/rust-lang/rust/issues/51540) or | ||
Slint requires a global memory allocator. That is currently only available in the nightly version of Rust, because the support for using a custom global | ||
allocator in a bare metal environment with `#![no_std]` has not been stabilized yet (see [#51540](https://github.com/rust-lang/rust/issues/51540) or | ||
[#66741](https://github.com/rust-lang/rust/issues/66741) for tracking issues). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change this paragraph to:
Slint requires a global memory allocator, only available in the nightly version of Rust at this time. We can support stable Rust once support for using a custom global
allocator in a bare metal environment with#![no_std]
has been stabilized (see #51540 or
#66741 for tracking issues).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comments on a oudated version of the wording.
I think the current wording is good enough.
If you think it could be improved, feel free to change it.
No description provided.