#asynchronous-programming #run-time #rasi #tokio #async-await #experimental #future

rasi-ext

This library includes extend features or experimental features that are useful for asynchronous programming

4 releases

0.1.11 Mar 15, 2024
0.1.10 Mar 12, 2024
0.1.9 Mar 12, 2024
0.1.8 Mar 12, 2024

#1169 in Asynchronous

Download history 306/week @ 2024-03-09 44/week @ 2024-03-16 4/week @ 2024-03-23 5/week @ 2024-03-30

359 downloads per month

MIT license

305KB
6K SLoC

RASI

CI Release "Crates.io version" "docs.rs docs"

architectural

The Rust Asynchronous System Interface (RASI) provides a unified API interface to Rust's asynchronous runtimes (such as tokio, async-std, etc.).

Motivation

Now, Rust has various implementations of the async runtime, most of which are compatible with the official futures, with the exception of tokio, which is a maverick.

However, simply using futures does not result in a runtime portable program.

For example, when you need to improve the performance of your application on the linux platform and try to replace tokio's default network mod implementation with io_uring, you can't do it very easily.

This is because the futures library is missing several key abstractions:

  • task
  • network
  • filesystem
  • time

RASI attempts to be a portable abstraction layer for asynchronous runtimes, either as a decorator for existing asynchronous runtimes or as a good starting point for newly developed asynchronous runtimes.

SYSCALL

The RASI defines a set of Syscalls to fill in the missing abstractions in the Futures crate:

  • Executor for working with asynchronous tasks.
  • Network primitives for TCP/UDP communication.
  • FileSystem manipulation operations.
  • Timer Utilities for tracking time.

All of the above Syscalls can be implemented separately and injected into a runtime portable program. When replacing any of the system call modules, your program code does not need to be changed except for the inject code.

Examples

Visit the reference implementation of the syscall for more information.

Also, you can apply it to your portable programs as appropriate.


lib.rs:

Extend features or experimental features that are useful for asynchronous programming.

Dependencies

~1–21MB
~372K SLoC