#rasi #run-time #syscalls #low-level #async #future #portable

no-std rasi-syscall

The low level syscall interface for RASI system

11 releases

0.1.11 Mar 15, 2024
0.1.10 Mar 12, 2024
0.1.0 Feb 29, 2024

#906 in Asynchronous

Download history 156/week @ 2024-02-24 379/week @ 2024-03-02 534/week @ 2024-03-09 134/week @ 2024-03-16 16/week @ 2024-03-23 4/week @ 2024-03-30

705 downloads per month
Used in 4 crates (3 directly)

MIT license

78KB
1K 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.

Dependencies

~1–1.7MB
~35K SLoC