Skip to content

Rust stable support#613

Merged
bors[bot] merged 4 commits intomasterfrom
rust-stable
Feb 12, 2022
Merged

Rust stable support#613
bors[bot] merged 4 commits intomasterfrom
rust-stable

Conversation

@Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Feb 11, 2022

This PR adds (limited) stable Rust support!

The drawbacks are:

So it's not that bad in the end, it's fully usable for shipping production-ready firmwares. We'll still recommend nightly as the default, until GATs and type_alias_impl_trait are stable.

@Dirbaio Dirbaio force-pushed the rust-stable branch 3 times, most recently from 0deffed to ca31489 Compare February 12, 2022 00:09
Copy link
Contributor

@huntc huntc left a comment

Choose a reason for hiding this comment

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

I infer that the goal here is to permit new people to get started with Embassy a means to do so without having to pin their toolchains. if that's the case, then perhaps we should make all of the examples avoid nightly features... The examples should always be easy to apply to one's own code. Thoughts

@Dirbaio
Copy link
Member Author

Dirbaio commented Feb 12, 2022

The experience is really bad if you can't use #[embassy::task], #[embassy::main]. Check how ugly is the example.

Not being able to use async traits is really bad, this means you won't be able to use any async hal-independent driver.

I see stable support as the following:

  • Have some answer for those people who will not use nightly no matter what, saying it's not "production ready" (an opinion I personally disagree with), but whatever. They can now use embassy, but with huge caveats.
  • Ensure we don't depend on more nightly features than strictly necessary, to ease the transition to fully stable when the ones we do need become stable.

Copy link
Contributor

@huntc huntc left a comment

Choose a reason for hiding this comment

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

Approving given that I now fully understand the motivation.

@Dirbaio
Copy link
Member Author

Dirbaio commented Feb 12, 2022

bors r+

@Dirbaio
Copy link
Member Author

Dirbaio commented Feb 12, 2022

Actually, for blocking HAL use, stable support is quite valuable. embassy-stm32 is already a quite competitive HAL vs the stm32xxx-hals from stm32-rs, due to being 1 unified HAL for all stm32 families (consistent API, already supports more peripherals vs the less maintained ones). So there's that as well :D

@bors
Copy link
Contributor

bors bot commented Feb 12, 2022

Build succeeded:

@bors bors bot merged commit e728a32 into master Feb 12, 2022
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.

2 participants