Skip to content

Commit c5c38a1

Browse files
committed
doc: add some doc
1 parent f39a24b commit c5c38a1

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ targets = [
1717
"x86_64-pc-windows-msvc",
1818
"x86_64-unknown-linux-gnu",
1919
"x86_64-apple-darwin",
20+
"aarch64-apple-ios",
21+
"aarch64-linux-android",
22+
"x86_64-unknown-dragonfly",
23+
"x86_64-unknown-freebsd",
24+
"x86_64-unknown-illumos",
25+
"x86_64-unknown-linux-gnu",
26+
"x86_64-unknown-netbsd",
27+
"x86_64-unknown-openbsd",
2028
]
2129

2230
# Shared dependencies for all platforms

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![docs.rs](https://img.shields.io/badge/docs.rs-compio-latest)](https://docs.rs/compio)
66
[![Azure DevOps builds](https://strawberry-vs.visualstudio.com/compio/_apis/build/status/Berrysoft.compio?branch=master)](https://strawberry-vs.visualstudio.com/compio/_build)
77

8-
A thread-per-core Rust runtime with IOCP/io_uring.
8+
A thread-per-core Rust runtime with IOCP/io_uring/mio.
99
The name comes from "completion-based IO".
1010
This crate is inspired by [monoio](https://github.com/bytedance/monoio/).
1111

@@ -22,6 +22,7 @@ and `tokio` won't public APIs to control `mio` before `mio` reaches 1.0.
2222
## Quick start
2323

2424
With `runtime` feature enabled, we can use the high level APIs to perform fs & net IO.
25+
2526
```rust,no_run
2627
use compio::{fs::File, task::block_on};
2728
@@ -36,6 +37,7 @@ println!("{}", buffer);
3637
```
3738

3839
While you can also control the low-level driver manually:
40+
3941
```rust,no_run
4042
use compio::{
4143
buf::IntoInner,

src/driver/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ pub trait Poller {
8484
///
8585
/// # Safety
8686
///
87-
/// `op` should be alive until [`Poller::poll`] returns its result.
87+
/// - `op` should be alive until [`Poller::poll`] returns its result.
88+
/// - `user_data` should be unique.
8889
unsafe fn push(&mut self, op: &mut (impl OpCode + 'static), user_data: usize)
8990
-> io::Result<()>;
9091

src/driver/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
//! This mod doesn't actually contain any driver, but meant to provide some
2+
//! common op type and utilities for unix platform (for iour and mio).
3+
14
pub(crate) mod op;

0 commit comments

Comments
 (0)