Skip to content

Commit 17f399e

Browse files
author
Lucas Paixão
committed
Initial commit
0 parents  commit 17f399e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+11787
-0
lines changed

.cargo/config.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[env]
2+
RUST_TEST_THREADS = { value = "1" }
3+
4+
[build]
5+
target = "x86_64-unknown-linux-gnu"
6+
7+
#[target.x86_64-unknown-linux-gnu]
8+
#linker = "rust-lld"
9+
#rustflags = ["-C", "link-arg=--target=x86_64-linux-gnu"]

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
env:
12+
RUSTFLAGS: -Dwarnings
13+
RUST_BACKTRACE: 1
14+
15+
jobs:
16+
# Depends on all actions that are required for a "successful" CI run.
17+
# Based on the ci here: https://github.com/tokio-rs/tokio/blob/master/.github/workflows/ci.yml
18+
all-systems-go:
19+
runs-on: ubuntu-latest
20+
needs:
21+
- check
22+
- clippy
23+
- fmt
24+
- test
25+
- test-docs
26+
- docs
27+
steps:
28+
- run: exit 0
29+
30+
bench:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install Rust
35+
run: rustup update stable
36+
- run: cargo bench --no-run
37+
38+
check:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Install Rust
43+
run: rustup update stable
44+
- run: cargo check
45+
46+
clippy:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
- name: Install Rust
51+
run: rustup update stable
52+
- run: cargo clippy
53+
54+
test:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: Install Rust
59+
run: rustup update stable
60+
- run: cargo test
61+
62+
test-docs:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v4
66+
- name: Install Rust
67+
run: rustup update stable
68+
- run: cargo test --doc
69+
70+
fmt:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
- name: Install Rust
75+
run: rustup update stable
76+
- run: cargo fmt -- --check
77+
78+
docs:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: Install Rust
83+
run: rustup update nightly && rustup default nightly
84+
- run: cargo doc --no-deps --all-features
85+
env:
86+
RUSTDOCFLAGS: -Dwarnings

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
Cargo.lock

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/tokio-uring-master.iml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# 0.4.0 (November 5th, 2022)
2+
3+
### Fixed
4+
5+
- Fix panic in Deref/DerefMut for Slice extending into uninitialized part of the buffer ([#52])
6+
- docs: all-features = true ([#84])
7+
- fix fs unit tests to avoid parallelism ([#121])
8+
- Box the socket address to allow moving the Connect future ([#126])
9+
- rt: Fix data race ([#146])
10+
11+
### Added
12+
13+
- Implement fs::File::readv_at()/writev_at() ([#87])
14+
- fs: implement FromRawFd for File ([#89])
15+
- Implement `AsRawFd` for `TcpStream` ([#94])
16+
- net: add TcpListener.local_addr method ([#107])
17+
- net: add TcpStream.write_all ([#111])
18+
- driver: add Builder API as an option to start ([#113])
19+
- Socket and TcpStream shutdown ([#124])
20+
- fs: implement fs::File::from_std ([#131])
21+
- net: implement FromRawFd for TcpStream ([#132])
22+
- fs: implement OpenOptionsExt for OpenOptions ([#133])
23+
- Add NoOp support ([#134])
24+
- Add writev to TcpStream ([#136])
25+
- sync TcpStream, UnixStream and UdpSocket functionality ([#141])
26+
- Add benchmarks for no-op submission ([#144])
27+
- Expose runtime structure ([#148])
28+
29+
### Changed
30+
31+
- driver: batch submit requests and add benchmark ([#78])
32+
- Depend on io-uring version ^0.5.8 ([#153])
33+
34+
### Internal Improvements
35+
36+
- chore: fix clippy lints ([#99])
37+
- io: refactor post-op logic in ops into Completable ([#116])
38+
- Support multi completion events: v2 ([#130])
39+
- simplify driver operation futures ([#139])
40+
- rt: refactor runtime to avoid Rc\<RefCell\<...>> ([#142])
41+
- Remove unused dev-dependencies ([#143])
42+
- chore: types and fields explicitly named ([#149])
43+
- Ignore errors from uring while cleaning up ([#154])
44+
- rt: drop runtime before driver during shutdown ([#155])
45+
- rt: refactor drop logic ([#157])
46+
- rt: fix error when calling block_on twice ([#162])
47+
48+
### CI changes
49+
50+
- chore: update actions/checkout action to v3 ([#90])
51+
- chore: add all-systems-go ci check ([#98])
52+
- chore: add clippy to ci ([#100])
53+
- ci: run cargo test --doc ([#135])
54+
55+
56+
[#52]: https://github.com/tokio-rs/tokio-uring/pull/52
57+
[#78]: https://github.com/tokio-rs/tokio-uring/pull/78
58+
[#84]: https://github.com/tokio-rs/tokio-uring/pull/84
59+
[#87]: https://github.com/tokio-rs/tokio-uring/pull/87
60+
[#89]: https://github.com/tokio-rs/tokio-uring/pull/89
61+
[#90]: https://github.com/tokio-rs/tokio-uring/pull/90
62+
[#94]: https://github.com/tokio-rs/tokio-uring/pull/94
63+
[#98]: https://github.com/tokio-rs/tokio-uring/pull/98
64+
[#99]: https://github.com/tokio-rs/tokio-uring/pull/99
65+
[#100]: https://github.com/tokio-rs/tokio-uring/pull/100
66+
[#107]: https://github.com/tokio-rs/tokio-uring/pull/107
67+
[#111]: https://github.com/tokio-rs/tokio-uring/pull/111
68+
[#113]: https://github.com/tokio-rs/tokio-uring/pull/113
69+
[#116]: https://github.com/tokio-rs/tokio-uring/pull/116
70+
[#121]: https://github.com/tokio-rs/tokio-uring/pull/121
71+
[#124]: https://github.com/tokio-rs/tokio-uring/pull/124
72+
[#126]: https://github.com/tokio-rs/tokio-uring/pull/126
73+
[#130]: https://github.com/tokio-rs/tokio-uring/pull/130
74+
[#131]: https://github.com/tokio-rs/tokio-uring/pull/131
75+
[#132]: https://github.com/tokio-rs/tokio-uring/pull/132
76+
[#133]: https://github.com/tokio-rs/tokio-uring/pull/133
77+
[#134]: https://github.com/tokio-rs/tokio-uring/pull/134
78+
[#135]: https://github.com/tokio-rs/tokio-uring/pull/135
79+
[#136]: https://github.com/tokio-rs/tokio-uring/pull/136
80+
[#139]: https://github.com/tokio-rs/tokio-uring/pull/139
81+
[#141]: https://github.com/tokio-rs/tokio-uring/pull/141
82+
[#142]: https://github.com/tokio-rs/tokio-uring/pull/142
83+
[#143]: https://github.com/tokio-rs/tokio-uring/pull/143
84+
[#144]: https://github.com/tokio-rs/tokio-uring/pull/144
85+
[#146]: https://github.com/tokio-rs/tokio-uring/pull/146
86+
[#148]: https://github.com/tokio-rs/tokio-uring/pull/148
87+
[#149]: https://github.com/tokio-rs/tokio-uring/pull/149
88+
[#153]: https://github.com/tokio-rs/tokio-uring/pull/153
89+
[#154]: https://github.com/tokio-rs/tokio-uring/pull/154
90+
[#155]: https://github.com/tokio-rs/tokio-uring/pull/155
91+
[#157]: https://github.com/tokio-rs/tokio-uring/pull/157
92+
[#162]: https://github.com/tokio-rs/tokio-uring/pull/162
93+
94+
# 0.3.0 (March 2nd, 2022)
95+
### Added
96+
- net: add unix stream & listener ([#74])
97+
- net: add tcp and udp support ([#40])
98+
99+
[#74]: https://github.com/tokio-rs/tokio-uring/pull/74
100+
[#40]: https://github.com/tokio-rs/tokio-uring/pull/40
101+
102+
# 0.2.0 (January 9th, 2022)
103+
104+
### Fixed
105+
- fs: fix error handling related to changes in rustc ([#69])
106+
- op: fix 'already borrowed' panic ([#39])
107+
108+
### Added
109+
- fs: add fs::remove_file ([#66])
110+
- fs: implement Debug for File ([#65])
111+
- fs: add remove_dir and unlink ([#63])
112+
- buf: impl IoBuf/IoBufMut for bytes::Bytes/BytesMut ([#43])
113+
114+
[#69]: https://github.com/tokio-rs/tokio-uring/pull/69
115+
[#66]: https://github.com/tokio-rs/tokio-uring/pull/66
116+
[#65]: https://github.com/tokio-rs/tokio-uring/pull/65
117+
[#63]: https://github.com/tokio-rs/tokio-uring/pull/63
118+
[#39]: https://github.com/tokio-rs/tokio-uring/pull/39
119+
[#43]: https://github.com/tokio-rs/tokio-uring/pull/43

Cargo.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[package]
2+
name = "tokio-uring"
3+
version = "0.5.0"
4+
authors = ["Tokio Contributors <team@tokio.rs>"]
5+
edition = "2018"
6+
readme = "README.md"
7+
license = "MIT"
8+
documentation = "https://docs.rs/tokio-uring/0.5.0/tokio-uring"
9+
repository = "https://github.com/tokio-rs/tokio-uring"
10+
homepage = "https://tokio.rs"
11+
description = """
12+
io-uring support for the Tokio asynchronous runtime.
13+
"""
14+
categories = ["asynchronous", "network-programming"]
15+
keywords = ["async", "fs", "io-uring"]
16+
17+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
18+
19+
[dependencies]
20+
tokio = { version = "1.2", features = ["full"] }
21+
atomic-wait = "1.1.0"
22+
atomic = "0.6"
23+
libc = "0.2.80"
24+
bytemuck = "1.22.0"
25+
io-uring = "0.6.0"
26+
socket2 = { version = "0.4.4", features = ["all"] }
27+
bytes = { version = "1.0", optional = true }
28+
futures-util = { version = "0.3.26", default-features = false, features = ["std"] }
29+
30+
[dev-dependencies]
31+
tempfile = "3.2.0"
32+
tokio-test = "0.4.2"
33+
iai = "0.1.1"
34+
criterion = "0.4.0"
35+
# we use joinset in our tests
36+
tokio = "1.21.2"
37+
nix = "0.26.1"
38+
39+
[package.metadata.docs.rs]
40+
all-features = true
41+
42+
[profile.bench]
43+
debug = true
44+
45+
[[bench]]
46+
name = "lai_no_op"
47+
path = "benches/lai/no_op.rs"
48+
harness = false
49+
50+
[[bench]]
51+
name = "criterion_no_op"
52+
path = "benches/criterion/no_op.rs"
53+
harness = false

0 commit comments

Comments
 (0)