Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/photondb/photonio
An efficient runtime for asynchronous applications in Rust.
https://github.com/photondb/photonio
asynchronous rust
Last synced: 3 months ago
JSON representation
An efficient runtime for asynchronous applications in Rust.
- Host: GitHub
- URL: https://github.com/photondb/photonio
- Owner: photondb
- License: mit
- Archived: true
- Created: 2022-09-22T14:31:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-08T12:29:39.000Z (about 2 years ago)
- Last Synced: 2024-07-28T17:40:29.705Z (3 months ago)
- Topics: asynchronous, rust
- Language: Rust
- Homepage:
- Size: 149 KB
- Stars: 43
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PhotonIO
[![crates][crates-badge]][crates-url]
[![docs][docs-badge]][docs-url][crates-badge]: https://img.shields.io/crates/v/photonio?style=flat-square
[crates-url]: https://crates.io/crates/photonio
[docs-badge]: https://img.shields.io/docsrs/photonio?style=flat-square
[docs-url]: https://docs.rs/photonio/latest/photonioPhotonIO is an efficient runtime for asynchronous applications in Rust.
## Features
- Asynchronous filesystem and networking I/O for Linux based on [`io_uring`][io_uring].
- A fallback implementation for other platforms based on [`Tokio`][tokio].
- A multi-thread runtime.[io_uring]: https://unixism.net/loti/
[tokio]: https://github.com/tokio-rs/tokio## Examples
```rust
use photonio::{fs::File, io::Write, io::WriteAt};#[photonio::main]
async fn main() -> std::io::Result<()> {
let mut file = File::create("hello.txt").await?;
file.write(b"hello").await?;
file.write_at(b"world", 5).await?;
Ok(())
}
```## Limitations
- Dropping an unfinished future for asynchronous filesystem or networking operations will result in a panic. However, this behavior might be change in the future.
- The current multi-thread runtime uses a naive round-robin fashion to schedule tasks. A work-stealing scheduler will be added in the future.