2 unstable releases

0.2.1 Jul 19, 2024
0.2.0 Jul 4, 2024
0.1.1 Jul 1, 2024
0.1.0 Jul 1, 2024

#1090 in Asynchronous

MIT license

89KB
1.5K SLoC

arta

Arta is an asynchronous runtime abstractions library for Rust, designed to provide a flexible and powerful interface for building asynchronous applications. With arta, you can abstract over different async runtimes, making your code async runtime agnostic.

Features

  • Easy Integration: Seamlessly integrate with existing async codebases.
  • Flexible API: Use a consistent API regardless of the underlying runtime.
  • Lightweight: No overhead, designed for performance.

Installation

Add arta to your Cargo.toml:

[dependencies]
arta = "0.1.0"

lib.rs:

arta-tokio

Arta-tokio is a crate that provides an implementation of arta abstractions for Tokio runtime.

Installation

Add a following dependencies to your Cargo.toml:

[dependencies]
arta-tokio = "0.1.0"
arta = "0.1.0"
tokio = { version = "^1", features = ["full"] }

Usage

#[tokio::main]
async fn main() {
    // After tokio runtime was initialized just call methods on `TokioGlobalRuntime` to use
    // this crate.
    // Example:
    let hosts = TokioGlobalRuntime.read_to_string("/etc/hosts").await.unwrap();
    println!("Hosts: {hosts}");
}

Dependencies

~3–11MB
~111K SLoC