agnostic-lite

Crates.ioagnostic-lite
lib.rsagnostic-lite
version0.3.15
sourcesrc
created_at2024-03-13 08:34:22.838674
updated_at2024-04-27 12:14:31.30705
description`agnostic-lite` is WASM friendly and light version of `agnostic`, for users who want to write async runtime-agnostic crate.
homepagehttps://github.com/al8n/agnostic
repositoryhttps://github.com/al8n/agnostic
max_upload_size
id1171524
size167,821
Al Liu (al8n)

documentation

https://docs.rs/agnostic-lite

README

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.

Commit count: 151

cargo fmt