Skip to content

Commit 60f822b

Browse files
committed
Merge branch 'master' into stream_count
2 parents 75546ef + 9ad0cf9 commit 60f822b

File tree

221 files changed

+7085
-2809
lines changed

Some content is hidden

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

221 files changed

+7085
-2809
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ on:
77
- staging
88
- trying
99

10+
env:
11+
RUSTFLAGS: -Dwarnings
12+
1013
jobs:
1114
build_and_test:
1215
name: Build and test
1316
runs-on: ${{ matrix.os }}
14-
env:
15-
RUSTFLAGS: -Dwarnings
1617
strategy:
1718
matrix:
1819
os: [ubuntu-latest, windows-latest, macOS-latest]
19-
rust: [nightly]
20+
rust: [nightly, beta, stable]
2021

2122
steps:
2223
- uses: actions/checkout@master
@@ -31,13 +32,31 @@ jobs:
3132
uses: actions-rs/cargo@v1
3233
with:
3334
command: check
34-
args: --all --bins --examples
35+
args: --all --bins --tests
3536

3637
- name: check unstable
3738
uses: actions-rs/cargo@v1
3839
with:
3940
command: check
40-
args: --features unstable --all --benches --bins --examples --tests
41+
args: --features unstable --all --bins --examples --tests
42+
- name: check bench
43+
uses: actions-rs/cargo@v1
44+
if: matrix.rust == 'nightly'
45+
with:
46+
command: check
47+
args: --benches
48+
49+
- name: check std only
50+
uses: actions-rs/cargo@v1
51+
with:
52+
command: check
53+
args: --no-default-features --features std
54+
55+
- name: check attributes
56+
uses: actions-rs/cargo@v1
57+
with:
58+
command: check
59+
args: --features attributes
4160

4261
- name: tests
4362
uses: actions-rs/cargo@v1
@@ -48,20 +67,15 @@ jobs:
4867
check_fmt_and_docs:
4968
name: Checking fmt and docs
5069
runs-on: ubuntu-latest
51-
env:
52-
RUSTFLAGS: -Dwarnings
5370
steps:
5471
- uses: actions/checkout@master
5572

56-
- id: component
57-
uses: actions-rs/components-nightly@v1
58-
with:
59-
component: rustfmt
60-
6173
- uses: actions-rs/toolchain@v1
6274
with:
63-
toolchain: ${{ steps.component.outputs.toolchain }}
75+
profile: minimal
76+
toolchain: nightly
6477
override: true
78+
components: rustfmt
6579

6680
- name: setup
6781
run: |
@@ -78,23 +92,14 @@ jobs:
7892
- name: Docs
7993
run: cargo doc --features docs
8094

81-
clippy_check:
82-
name: Clippy check
83-
runs-on: ubuntu-latest
84-
# TODO: There is a lot of warnings
85-
# env:
86-
# RUSTFLAGS: -Dwarnings
87-
steps:
88-
- uses: actions/checkout@v1
89-
- id: component
90-
uses: actions-rs/components-nightly@v1
91-
with:
92-
component: clippy
93-
- uses: actions-rs/toolchain@v1
94-
with:
95-
toolchain: ${{ steps.component.outputs.toolchain }}
96-
override: true
97-
- run: rustup component add clippy
98-
- uses: actions-rs/clippy-check@v1
99-
with:
100-
token: ${{ secrets.GITHUB_TOKEN }}
95+
# clippy_check:
96+
# name: Clippy check
97+
# runs-on: ubuntu-latest
98+
# steps:
99+
# - uses: actions/checkout@v1
100+
# - name: Install rust
101+
# run: rustup update beta && rustup default beta
102+
# - name: Install clippy
103+
# run: rustup component add clippy
104+
# - name: clippy
105+
# run: cargo clippy --all --features unstable

CHANGELOG.md

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,154 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview
77

88
## [Unreleased]
99

10+
# [1.0.0] - 2019-11-11
11+
12+
[API Documentation](https://docs.rs/async-std/1.0.0/async-std)
13+
14+
This release marks the `1.0.0` release of async-std; a major milestone for our
15+
development. This release itself mostly includes quality of life improvements
16+
for all of modules, including more consistent API bounds for a lot of our
17+
submodules.
18+
19+
The biggest change is that we're now using the full semver range,
20+
`major.minor.patch`, and any breaking changes to our "stable" APIs will require
21+
an update of the `major` number.
22+
23+
We're excited we've hit this milestone together with you all. Thank you!
24+
25+
## Added
26+
27+
- Added `Future::join` as "unstable", replacing `future::join!`.
28+
- Added `Future::try_join` as "unstable", replacing `future::try_join!`.
29+
- Enabled `stable` and `beta` channel testing on CI.
30+
- Implemented `FromIterator` and `Extend` for `PathBuf`.
31+
- Implemented `FromStream` for `PathBuf`.
32+
- Loosened the trait bounds of `io::copy` on "unstable".
33+
34+
## Changed
35+
36+
- Added a `Sync` bound to `RwLock`, resolving a memory safety issue.
37+
- Fixed a bug in `Stream::take_while` where it could continue after it should've
38+
ended.
39+
- Fixed a bug where our `attributes` Cargo feature wasn't working as intended.
40+
- Improved documentation of `Stream::merge`, documenting ordering guarantees.
41+
- Update doc imports in examples to prefer async-std's types.
42+
- Various quality of life improvements to the `future` submodule.
43+
- Various quality of life improvements to the `path` submodule.
44+
- Various quality of life improvements to the `stream` submodule.
45+
46+
## Removed
47+
48+
- Removed `future::join!` in favor of `Future::join`.
49+
- Removed `future::try_join!` in favor of `Future::try_join`.
50+
51+
# [0.99.12] - 2019-11-07
52+
53+
[API Documentation](https://docs.rs/async-std/0.99.12/async-std)
54+
55+
This patch upgrades us to `futures` 0.3, support for `async/await` on Rust
56+
Stable, performance improvements, and brand new module-level documentation.
57+
58+
## Added
59+
60+
- Added `Future::flatten` as "unstable".
61+
- Added `Future::race` as "unstable" (replaces `future::select!`).
62+
- Added `Future::try_race` as "unstable" (replaces `future::try_select!`).
63+
- Added `Stderr::lock` as "unstable".
64+
- Added `Stdin::lock` as "unstable".
65+
- Added `Stdout::lock` as "unstable".
66+
- Added `Stream::copied` as "unstable".
67+
- Added `Stream::eq` as "unstable".
68+
- Added `Stream::max_by_key` as "unstable".
69+
- Added `Stream::min` as "unstable".
70+
- Added `Stream::ne` as "unstable".
71+
- Added `Stream::position` as "unstable".
72+
- Added `StreamExt` and `FutureExt` as enumerable in the `prelude`.
73+
- Added `TcpListener` and `TcpStream` integration tests.
74+
- Added `stream::from_iter`.
75+
- Added `sync::WakerSet` for internal use.
76+
- Added an example to handle both `IP v4` and `IP v6` connections.
77+
- Added the `default` Cargo feature.
78+
- Added the `attributes` Cargo feature.
79+
- Added the `std` Cargo feature.
80+
81+
## Changed
82+
83+
- Fixed a bug in the blocking threadpool where it didn't spawn more than one thread.
84+
- Fixed a bug with `Stream::merge` where sometimes it ended too soon.
85+
- Fixed a bug with our GitHub actions setup.
86+
- Fixed an issue where our channels could spuriously deadlock.
87+
- Refactored the `task` module.
88+
- Removed a deprecated GitHub action.
89+
- Replaced `futures-preview` with `futures`.
90+
- Replaced `lazy_static` with `once_cell`.
91+
- Replaced all uses of `VecDequeue` in the examples with `stream::from_iter`.
92+
- Simplified `sync::RwLock` using the internal `sync::WakerSet` type.
93+
- Updated the `path` submodule documentation to match std.
94+
- Updated the mod-level documentation to match std.
95+
96+
## Removed
97+
98+
- Removed `future::select!` (replaced by `Future::race`).
99+
- Removed `future::try_select!` (replaced by `Future::try_race`).
100+
101+
# [0.99.11] - 2019-10-29
102+
103+
This patch introduces `async_std::sync::channel`, a novel asynchronous port of
104+
the ultra-fast Crossbeam channels. This has been one of the most anticipated
105+
features for async-std, and we're excited to be providing a first version of
106+
this!
107+
108+
In addition to channels, this patch has the regular list of new methods, types,
109+
and doc fixes.
110+
111+
## Examples
112+
113+
__Send and receive items from a channel__
114+
```rust
115+
// Create a bounded channel with a max-size of 1
116+
let (s, r) = channel(1);
117+
118+
// This call returns immediately because there is enough space in the channel.
119+
s.send(1).await;
120+
121+
task::spawn(async move {
122+
// This call blocks the current task because the channel is full.
123+
// It will be able to complete only after the first message is received.
124+
s.send(2).await;
125+
});
126+
127+
// Receive items from the channel
128+
task::sleep(Duration::from_secs(1)).await;
129+
assert_eq!(r.recv().await, Some(1));
130+
assert_eq!(r.recv().await, Some(2));
131+
```
132+
133+
## Added
134+
- Added `Future::delay` as "unstable"
135+
- Added `Stream::flat_map` as "unstable"
136+
- Added `Stream::flatten` as "unstable"
137+
- Added `Stream::product` as "unstable"
138+
- Added `Stream::sum` as "unstable"
139+
- Added `Stream::min_by_key`
140+
- Added `Stream::max_by`
141+
- Added `Stream::timeout` as "unstable"
142+
- Added `sync::channel` as "unstable".
143+
- Added doc links from instantiated structs to the methods that create them.
144+
- Implemented `Extend` + `FromStream` for `PathBuf`.
145+
146+
## Changed
147+
- Fixed an issue with `block_on` so it works even when nested.
148+
- Fixed issues with our Clippy check on CI.
149+
- Replaced our uses of `cfg_if` with our own macros, simplifying the codebase.
150+
- Updated the homepage link in `Cargo.toml` to point to [async.rs](https://async.rs).
151+
- Updated the module-level documentation for `stream` and `sync`.
152+
- Various typos and grammar fixes.
153+
- Removed redundant file flushes, improving the performance of `File` operations
154+
155+
## Removed
156+
Nothing was removed in this release.
157+
10158
# [0.99.10] - 2019-10-16
11159

12160
This patch stabilizes several core concurrency macros, introduces async versions
@@ -281,7 +429,10 @@ task::blocking(async {
281429

282430
- Initial beta release
283431

284-
[Unreleased]: https://github.com/async-rs/async-std/compare/v0.99.10...HEAD
432+
[Unreleased]: https://github.com/async-rs/async-std/compare/v1.0.0...HEAD
433+
[1.0.0]: https://github.com/async-rs/async-std/compare/v0.99.12...v1.0.0
434+
[0.99.12]: https://github.com/async-rs/async-std/compare/v0.99.11...v0.99.12
435+
[0.99.11]: https://github.com/async-rs/async-std/compare/v0.99.10...v0.99.11
285436
[0.99.10]: https://github.com/async-rs/async-std/compare/v0.99.9...v0.99.10
286437
[0.99.9]: https://github.com/async-rs/async-std/compare/v0.99.8...v0.99.9
287438
[0.99.8]: https://github.com/async-rs/async-std/compare/v0.99.7...v0.99.8

Cargo.toml

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-std"
3-
version = "0.99.10"
3+
version = "1.0.0"
44
authors = [
55
"Stjepan Glavina <[email protected]>",
66
"Yoshua Wuyts <[email protected]>",
@@ -21,37 +21,67 @@ features = ["docs"]
2121
rustdoc-args = ["--cfg", "feature=\"docs\""]
2222

2323
[features]
24-
docs = ["unstable"]
25-
unstable = ["broadcaster"]
24+
default = [
25+
"std",
26+
"async-task",
27+
"crossbeam-channel",
28+
"crossbeam-deque",
29+
"futures-timer",
30+
"kv-log-macro",
31+
"log",
32+
"mio",
33+
"mio-uds",
34+
"num_cpus",
35+
"pin-project-lite",
36+
]
37+
docs = ["attributes", "unstable"]
38+
unstable = ["default", "broadcaster"]
39+
attributes = ["async-attributes"]
40+
std = [
41+
"async-macros",
42+
"crossbeam-utils",
43+
"futures-core",
44+
"futures-io",
45+
"memchr",
46+
"once_cell",
47+
"pin-project-lite",
48+
"pin-utils",
49+
"slab",
50+
]
2651

2752
[dependencies]
28-
async-macros = "1.0.0"
29-
async-task = "1.0.0"
30-
crossbeam-channel = "0.3.9"
31-
crossbeam-deque = "0.7.1"
32-
crossbeam-utils = "0.6.6"
33-
futures-core-preview = "=0.3.0-alpha.19"
34-
futures-io-preview = "=0.3.0-alpha.19"
35-
futures-timer = "1.0.2"
36-
lazy_static = "1.4.0"
37-
log = { version = "0.4.8", features = ["kv_unstable"] }
38-
memchr = "2.2.1"
39-
mio = "0.6.19"
40-
mio-uds = "0.6.7"
41-
num_cpus = "1.10.1"
42-
pin-utils = "0.1.0-alpha.4"
43-
slab = "0.4.2"
44-
kv-log-macro = "1.0.4"
53+
async-attributes = { version = "1.1.0", optional = true }
54+
async-macros = { version = "1.0.0", optional = true }
55+
async-task = { version = "1.0.0", optional = true }
4556
broadcaster = { version = "0.2.6", optional = true, default-features = false, features = ["default-channels"] }
46-
pin-project-lite = "0.1"
57+
crossbeam-channel = { version = "0.3.9", optional = true }
58+
crossbeam-deque = { version = "0.7.1", optional = true }
59+
crossbeam-utils = { version = "0.6.6", optional = true }
60+
futures-core = { version = "0.3.0", optional = true }
61+
futures-io = { version = "0.3.0", optional = true }
62+
futures-timer = { version = "1.0.2", optional = true }
63+
kv-log-macro = { version = "1.0.4", optional = true }
64+
log = { version = "0.4.8", features = ["kv_unstable"], optional = true }
65+
memchr = { version = "2.2.1", optional = true }
66+
mio = { version = "0.6.19", optional = true }
67+
mio-uds = { version = "0.6.7", optional = true }
68+
num_cpus = { version = "1.10.1", optional = true }
69+
once_cell = { version = "1.2.0", optional = true }
70+
pin-project-lite = { version = "0.1", optional = true }
71+
pin-utils = { version = "0.1.0-alpha.4", optional = true }
72+
slab = { version = "0.4.2", optional = true }
4773

4874
[dev-dependencies]
4975
femme = "1.2.0"
5076
rand = "0.7.2"
5177
# surf = "1.0.2"
5278
tempdir = "0.3.7"
53-
futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] }
79+
futures = "0.3.0"
80+
81+
[[test]]
82+
name = "stream"
83+
required-features = ["unstable"]
5484

55-
# These are used by the book for examples
56-
futures-channel-preview = "=0.3.0-alpha.19"
57-
futures-util-preview = "=0.3.0-alpha.19"
85+
[[example]]
86+
name = "tcp-ipv4-and-6-echo"
87+
required-features = ["unstable"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ syntax.
6161
## Features
6262

6363
- __Modern:__ Built from the ground up for `std::future` and `async/await` with
64-
blazing fast compilation times.
64+
blazing fast compilation time.
6565
- __Fast:__ Our robust allocator and threadpool designs provide ultra-high
6666
throughput with predictably low latency.
6767
- __Intuitive:__ Complete parity with the stdlib means you only need to learn

0 commit comments

Comments
 (0)