This is a safe Rust async runtime.
Related crates:
- safina-timer
forbid(unsafe_code)
std
nightly
, for
OnceCell
and
Wake traitrust
safina::increase_threads_to(1);
let (sender, receiver) = std::sync::mpsc::channel();
safina::spawn(Box::pin(async move {
sender.send(()).unwrap();
}));
receiver.recv().unwrap();
rust
std::thread::spawn(safina::work);
let result = safina::block_on(Box::pin(async {
prepare_request().await?;
execute_request().await
}))?;
https://docs.rs/safina
unsafe
codeunsafe
codeunsafe
Cargo.toml
and bump version number../release.sh
spawn
block_on
increase_threads_to
stop_threads
, allow_threads
, and increase_threads_to
.once_cell
and unsafe RawWaker
and builds with Rust stable
.License: Apache-2.0