Complete native async task integration - #30
Merged
Conversation
Implement the ADR 0079 compiler task-frame and cancellation ABI so cold typed tasks execute through the native scheduler with precise ready and suspended roots. Preserve structured ownership, cancellation masking, cleanup, and terminal outcomes across canonical MIR, the interpreter, and LLVM.\n\nAdvance the stable native descriptor to ABI 1.12, synchronize the standard Task surface and architecture, and close the corresponding roadmap work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete coroutines, async functions, awaiting, cooperative cancellation, and
scoped async cleanup through one backend-neutral HIR/MIR contract.
This change:
await, async closures,async defer, structured taskgroups, explicit cancellation sources/tokens, and cancellation masking;
ownership into verified HIR and canonical MIR;
lifecycle and restores relocated roots before polling;
ABI 2 production-GC support;
Architecture traceability
architecture/05-runtime-and-abi.mdTask.cancellationSource(),Task.cancelToken(source), andTask.cancel(source)Task.groupandTask.startTask<T>creation, prefixawait, async functions/closures, andsuspension-capable
async deferSynchronizesandSuspendseffectsentries
decisions, foundational Task metadata, and API baseline;
ROADMAP.mdentries.Verification
cargo fmt --all -- --checkcargo check --workspace --all-targetscargo test --workspace --all-targetscargo clippy --workspace --all-targets -- -D warningsIf a check was not run, explain why:
cargo test --workspacepassed completely. The all-target command was alsostarted and passed the compiler, runtime, architecture, interpreter, LLVM, C,
and other test suites reached before it entered the long harness-free compiler
and scheduler benchmarks. It was manually interrupted while those benchmarks
were still succeeding, so the complete all-target command did not return a
final status.
Additional focused suites passed, including the full MIR, LLVM, native runtime,
native ABI, standard-library baseline, and architecture test suites.
Review notes
Native ABI 1.12 deliberately retains stable managed-reference tokens. It does
not advertise ABI 2 or satisfy the production moving-GC profile. Production GC
integration remains gated on the complete ABI 2 writable-root composition.
The experimental C backend rejects coroutine runtime requirements before
emission and has no synchronous or dynamic fallback.