Welcome to rusty-spot
!
This is a simple and educational asynchronous runtime implementation in Rust. It is designed to help learners understand the basics of asynchronous programming and executors in Rust without diving into the complexities of mature and optimized asynchronous runtimes.
The Rusty-spotted cat is one of the smallest felines in the world, native to India and Sri Lanka. Despite its size, it's a competent and adaptable predator. Similarly, rusty-spot
aims to provide a competent async runtime with a minimalist footprint in the vast ecosystem of Rust.
Note: It's just a toy project to help me understand Rust async runtime and test the code function of GPT-4. I will add more features to it in the future.
- Simple Delay Future: Provides a basic delay mechanism to simulate asynchronous behavior.
- Mini Waker: A minimal implementation of a waker that can be used to wake up a future.
- Mini Executor: An executor that can drive a future to completion.
Use as a library:
let executor = MiniExecutor::new();
executor.run(async {
let delay = DelayFuture::new(Duration::from_millis(200));
delay.await;
});
You also can run the example to see the basic usage:
cargo run --example basic_usage
The majority of the code(even the README.md
) was masterfully generated by OpenAI's GPT-4, a remarkable mentor in this endeavor. Humans were mainly involved in refining, polishing, and reviewing the code. Special thanks to GPT-4 for making this learning journey enlightening!