safina-executor 0.1.0

Safe async runtime
Documentation

safina-executor

crates.io version license: Apache 2.0 unsafe forbidden pipeline status

This is a safe Rust async executor.

Related crates:

Features

  • forbid(unsafe_code)
  • Depends only on std
  • Good test coverage (100%)

Limitations

Documentation

https://docs.rs/safina-executor

Examples

safina_executor::increase_threads_to(1);
let (sender, receiver) = std::sync::mpsc::channel();
safina_executor::spawn(Box::pin(async move {
    sender.send(()).unwrap();
}));
receiver.recv().unwrap();
std::thread::spawn(safina_executor::work);
let result = safina_executor::block_on(Box::pin(async {
    prepare_request().await?;
    execute_request().await
}))?;

Alternatives

  • smol
    • popular
    • Contains generous amounts of unsafe code
  • async-std
    • popular
    • Contains generous amounts of unsafe code
  • tokio
    • very popular
    • Fast, internally complicated, and full of unsafe
  • nostd_async

Release Process

  1. Edit Cargo.toml and bump version number.
  2. Run ./release.sh

Changelog

  • v0.1.1 - Add badges to readme
  • v0.1.0 - First published version

TO DO

  • DONE - Implement spawn
  • DONE - Implement block_on
  • DONE - Implement increase_threads_to
  • DONE - Drop finished futures
  • DONE - Handle task panic
  • DONE - Add stop_threads, allow_threads, and increase_threads_to.
  • DONE - Add tests
  • DONE - Add docs
  • DONE - Publish on crates.io
  • DONE - Add an #[async_test] macro
  • Add a stress test
  • Add a benchmark
  • Make a version of the crate that uses unsafe once_cell and unsafe RawWaker and builds with Rust stable.
  • Add an #[async_main] macro

License: Apache-2.0