Skip to content
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

Merged
merged 42 commits into from
Sep 12, 2022
Merged

Conversation

tronical
Copy link
Member

No description provided.

... 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 :-)
This emphasizes the time difference better
api/rs/slint/mcu.md Outdated Show resolved Hide resolved
api/rs/slint/mcu.md Outdated Show resolved Hide resolved
Comment on lines 48 to 49
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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!

api/rs/slint/mcu.md Outdated Show resolved Hide resolved
api/rs/slint/mcu.md Outdated Show resolved Hide resolved
tronical and others added 3 commits September 12, 2022 11:50
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Copy link
Member

@hunger hunger left a 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.
@tronical
Copy link
Member Author

Suggest rewording

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).
Copy link
Member

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).

Copy link
Member

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.

@ogoffart ogoffart merged commit f600181 into master Sep 12, 2022
@ogoffart ogoffart deleted the simon/mcu-docs-polish branch September 12, 2022 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants