Skip to content

A simple and educational asynchronous runtime implementation in Rust.

Notifications You must be signed in to change notification settings

zyy17/rusty-spot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusty-spot

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.

rusty-spotted cat

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.

Features

  • 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.

Quick Start

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

Credits

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!

About

A simple and educational asynchronous runtime implementation in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages