This repository contains my article "Async destruction on stable rust" and the proof of concept Rust runtime with async destruction implemented as described in the article. I have published the article on r/rust to discuss with people if they think the approach is feasible, but it did not get any attention. So this repository can be useful for you if your are making a research on the topic. No future work is planned here. I have another async executor project aiur which can potentially evolve into something useful.
The toy
async runtime with async destruction is implemented here:
-
It is not for production use: this is a proof of concept code that supposed to verify if the idea can actually work. While working on this library I have discovered some difficulties I did not expect initially, so it was useful.
-
To make things simple the runtime only supports futures with
()
as return type. -
There is room for improvement runtime performance and code clarity.
-
This library uses
Arc
while for this single thread executor theRc
would be sufficient. The reason is usesstd::task::Wake
to implementWaker
, which is based onArc
. -
There is some unsafe internally while the public API of toy module is safe. I believe that unsafe does not produce any unsoundness.