docs.rs failed to build scipio-0.1.0-alpha
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
scipio-0.1.5-alpha
Scipio - asynchronous thread per core applications in Rust.
Makes heavy use of io_uring so this is Linux-only. 5.8 or newer is recommended.
This library provides abstractions for timers, file I/O and networking plus support for multiple-queues and an internal scheduler. All without using threads.
Examples
Connect to example.com:80
, or time out after 10 seconds.
use scipio::{Async, LocalExecutor};
use scipio::timer::Timer;
use futures_lite::{future::FutureExt, io};
use std::net::{TcpStream, ToSocketAddrs};
use std::time::Duration;
let local_ex = LocalExecutor::make_default();
local_ex.run(async {
let addr = "::80".to_socket_addrs()?.next().unwrap();
let stream = Async::<TcpStream>::connect(addr).or(async {
Timer::new(Duration::from_secs(10)).await;
Err(io::ErrorKind::TimedOut.into())
})
.await?;
std::io::Result::Ok(())
});