Skip to content

feat: no_alloc version - #14

Merged
SeaRoll merged 6 commits into
masterfrom
feat-no-alloc
Dec 20, 2025
Merged

feat: no_alloc version#14
SeaRoll merged 6 commits into
masterfrom
feat-no-alloc

Conversation

@SeaRoll

@SeaRoll SeaRoll commented Dec 20, 2025

Copy link
Copy Markdown
Owner

No description provided.

@SeaRoll
SeaRoll requested a review from Copilot December 20, 2025 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the ATO async runtime to eliminate heap allocation requirements, making it truly no_alloc compatible. The core change replaces boxed, heap-allocated futures with stack-pinned futures using lifetimes and introduces a task! macro for ergonomic stack pinning.

Key changes:

  • Removed alloc dependency and converted Spawner to use stack-pinned futures with lifetime parameters
  • Introduced task! macro to simplify creation of stack-pinned async blocks
  • Refactored sleep and yield_now into separate modules for better code organization

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/lib.rs Removed alloc dependency, added lifetime parameter to Spawner, introduced task! macro, moved sleep/yield_now to separate modules
src/sleep.rs Extracted DurationSleep future and sleep function into dedicated module
src/yield_now.rs Extracted YieldNow future and yield_now function into dedicated module
examples/simple.rs Updated to use new stack-pinned task API with task! macro
examples/time.rs Updated to use new stack-pinned task API and changed from static to local spawner
examples/yield.rs Updated to use new stack-pinned task API with named task variables
README.md Updated documentation to reflect no_alloc capability and simplified usage example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread examples/time.rs
Comment thread examples/time.rs
@SeaRoll SeaRoll linked an issue Dec 20, 2025 that may be closed by this pull request
@SeaRoll
SeaRoll merged commit 9c7b7ca into master Dec 20, 2025
4 checks passed
@SeaRoll
SeaRoll deleted the feat-no-alloc branch December 20, 2025 08:36
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.

No alloc version

2 participants