Skip to content

Conversation

@fogti
Copy link
Member

@fogti fogti commented Jan 21, 2026

Cherry-picked 78cfea8.

Note that this doesn't make async-executor actually work in a no-std setting by default (due to lack of locks, etc.), but it puts all the stuff in place that will always be necessary, no matter which lock implementation is actually used.

@fogti fogti force-pushed the no-std-minimal branch 5 times, most recently from bccd5f9 to fb08aa6 Compare January 21, 2026 14:19
@fogti fogti requested a review from zeenix January 21, 2026 14:23
Copy link
Member

@zeenix zeenix left a comment

Choose a reason for hiding this comment

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

LGTM but isn't this a breaking change?

@fogti
Copy link
Member Author

fogti commented Jan 21, 2026

Maybe (it does break building async-executor with default-features = false).

@fogti fogti force-pushed the no-std-minimal branch 3 times, most recently from 4dd839b to 51484cf Compare January 21, 2026 17:23
@fogti fogti requested a review from zeenix January 21, 2026 17:23
@fogti fogti marked this pull request as draft January 21, 2026 17:34
@fogti
Copy link
Member Author

fogti commented Jan 21, 2026

(Marked as draft because we need to wait for the current release to get finished)

@zeenix
Copy link
Member

zeenix commented Jan 21, 2026

Maybe (it does break building async-executor with default-features = false).

Yeah, adding a default feature that gates existing functionality/api, is a breaking change for sure.

src/lib.rs Outdated
#[cfg(feature = "std")]
let mut rng = fastrand::Rng::new();
#[cfg(not(feature = "std"))]
let mut rng = fastrand::Rng::with_seed(0);
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend using either a pre-set value other than 0 or the address of a function as the seed here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this better (unfortunately, one can't use the address of the current function, because it's async and is unnameable (at least I couldn't find a way to state it).

Co-authored-by: Έλλεν Εμίλια Άννα Zscheile <fogti+devel@ytrizja.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants