#run-time #traits #async #agnostic

no-std agnostic-lite

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate

3 releases

0.3.15 Apr 27, 2024
0.3.14 Apr 23, 2024
0.3.13 Mar 26, 2024
0.2.5 Mar 19, 2024
0.1.1 Mar 13, 2024

#1018 in Asynchronous

Download history 281/week @ 2024-03-11 2091/week @ 2024-03-18 1027/week @ 2024-03-25 246/week @ 2024-04-01 614/week @ 2024-04-08 182/week @ 2024-04-15 678/week @ 2024-04-22 46/week @ 2024-04-29 12/week @ 2024-05-06 27/week @ 2024-05-13 58/week @ 2024-05-20 73/week @ 2024-05-27 47/week @ 2024-06-03 58/week @ 2024-06-10 50/week @ 2024-06-17 67/week @ 2024-06-24

224 downloads per month
Used in 17 crates (8 directly)

MIT/Apache

170KB
4.5K SLoC

Agnostic-Lite

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate.

github LoC Build codecov

docs.rs crates.io crates.io license

English | 简体中文

Introduction

agnostic-lite is WASM friendly and light version of agnostic, for users who want to write async runtime-agnostic crate.

agnostic-lite splits the big Runtime trait in agnostic in multiple small traits:

  • AsyncSpawner: trait for spawning tasks
  • AsyncLocalSpawner: trait for spawning local tasks
  • AsyncSleep: trait for sleep functionality
  • AsyncInterval: trait for interval functionality
  • AsyncTimeout: trait for timeout functionality

Builtin supports runtimes:

  • tokio
  • async-std
  • smol
  • wasm-bindgen-futures

Installation

[dependencies]
agnostic-lite = "0.2"

License

agnostic-lite is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2024 Al Liu.

Dependencies

~0.8–13MB
~158K SLoC