Implement the portable Wave async task runtime and executor
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
Parent: #439
Depends on: #440 and #443.
## Summary
Provide the minimal portable runtime contracts needed to poll, wake, schedule, cancel, and complete Wave async computations.
## Scope
- Define the stable in-language `Poll`, future, task, and waker representations used by lowered code.
- Provide a single-threaded baseline executor before optional multithreaded scheduling.
- Define task allocation, queue ownership, wake coalescing, cancellation, shutdown, and result retrieval.
- Avoid mandatory libc dependencies in freestanding builds; hosted and freestanding availability must be explicit.
- Keep runtime interfaces backend-neutral and compatible with a future Whale toolchain.
- Define the private `async fun main()` adapter only after executor ownership is clear.
- Add deterministic tests that do not depend on wall-clock races.
## Completion criteria
- [ ] A task that returns immediately, yields once, and wakes multiple times completes correctly.
- [ ] Duplicate wakes do not corrupt the run queue.
- [ ] Cancellation and executor shutdown release frame/runtime resources according to the semantic contract.
- [ ] Hosted Linux, macOS, and Windows runtime smoke tests pass.
- [ ] Unsupported freestanding use produces a clear compile/driver diagnostic.
- [ ] Runtime APIs include short Wave comments and examples.
Contributor guide
Research direction
The issue names no files or test entry points. Start by reading parent #439 and dependencies #440 and #443, then map the runtime contracts and executor ownership against the listed scope. Done means deterministic task, wake, cancellation, shutdown, platform smoke, freestanding diagnostic, and API documentation criteria are all covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100