All Versions
31
Latest Version
Avg Release Cycle
42 days
Latest Release
812 days ago

Changelog History
Page 3

  • v1.0.0 Changes

    November 11, 2019

    ๐Ÿ“š API Documentation

    ๐Ÿš€ This release marks the 1.0.0 release of async-std; a major milestone for our ๐Ÿš€ development. This release itself mostly includes quality of life improvements for all of modules, including more consistent API bounds for a lot of our submodules.

    The biggest change is that we're now using the full semver range, major.minor.patch, and any breaking changes to our "stable" APIs will require โšก๏ธ an update of the major number.

    We're excited we've hit this milestone together with you all. Thank you!

    โž• Added

    • โž• Added Future::join as "unstable", replacing future::join!.
    • Added Future::try_join as "unstable", replacing future::try_join!.
    • โœ… Enabled stable and beta channel testing on CI.
    • Implemented FromIterator and Extend for PathBuf.
    • Implemented FromStream for PathBuf.
    • Loosened the trait bounds of io::copy on "unstable".

    ๐Ÿ”„ Changed

    • โž• Added a Sync bound to RwLock, resolving a memory safety issue.
    • ๐Ÿ›  Fixed a bug in Stream::take_while where it could continue after it should've ended.
    • ๐Ÿ›  Fixed a bug where our attributes Cargo feature wasn't working as intended.
    • ๐Ÿ‘Œ Improved documentation of Stream::merge, documenting ordering guarantees.
    • โšก๏ธ Update doc imports in examples to prefer async-std's types.
    • Various quality of life improvements to the future submodule.
    • Various quality of life improvements to the path submodule.
    • Various quality of life improvements to the stream submodule.

    โœ‚ Removed

    • โœ‚ Removed future::join! in favor of Future::join.
    • Removed future::try_join! in favor of Future::try_join.
  • v0.99.12 Changes

    November 07, 2019

    ๐Ÿ“š API Documentation

    โฌ†๏ธ This patch upgrades us to futures 0.3, support for async/await on Rust ๐Ÿ“š Stable, performance improvements, and brand new module-level documentation.

    โž• Added

    • โž• Added Future::flatten as "unstable".
    • โž• Added Future::race as "unstable" (replaces future::select!).
    • Added Future::try_race as "unstable" (replaces future::try_select!).
    • โž• Added Stderr::lock as "unstable".
    • โž• Added Stdin::lock as "unstable".
    • โž• Added Stdout::lock as "unstable".
    • โž• Added Stream::copied as "unstable".
    • โž• Added Stream::eq as "unstable".
    • Added Stream::max_by_key as "unstable".
    • โž• Added Stream::min as "unstable".
    • โž• Added Stream::ne as "unstable".
    • โž• Added Stream::position as "unstable".
    • โž• Added StreamExt and FutureExt as enumerable in the prelude.
    • โž• Added TcpListener and TcpStream integration tests.
    • โž• Added stream::from_iter.
    • โž• Added sync::WakerSet for internal use.
    • โž• Added an example to handle both IP v4 and IP v6 connections.
    • โž• Added the default Cargo feature.
    • โž• Added the attributes Cargo feature.
    • โž• Added the std Cargo feature.

    ๐Ÿ”„ Changed

    • ๐Ÿ›  Fixed a bug in the blocking threadpool where it didn't spawn more than one thread.
    • ๐Ÿ›  Fixed a bug with Stream::merge where sometimes it ended too soon.
    • ๐Ÿ›  Fixed a bug with our GitHub actions setup.
    • ๐Ÿ›  Fixed an issue where our channels could spuriously deadlock.
    • ๐Ÿ”จ Refactored the task module.
    • โœ‚ Removed a deprecated GitHub action.
    • Replaced futures-preview with futures.
    • Replaced lazy_static with once_cell.
    • Replaced all uses of VecDequeue in the examples with stream::from_iter.
    • ๐Ÿ”€ Simplified sync::RwLock using the internal sync::WakerSet type.
    • ๐Ÿ“š Updated the path submodule documentation to match std.
    • ๐Ÿ“š Updated the mod-level documentation to match std.

    โœ‚ Removed

    • โœ‚ Removed future::select! (replaced by Future::race).
    • Removed future::try_select! (replaced by Future::try_race).
  • v0.99.11 Changes

    October 29, 2019

    ๐Ÿ”€ This patch introduces async_std::sync::channel, a novel asynchronous port of the ultra-fast Crossbeam channels. This has been one of the most anticipated ๐Ÿ”‹ features for async-std, and we're excited to be providing a first version of this!

    In addition to channels, this patch has the regular list of new methods, types, ๐Ÿ›  and doc fixes.

    Examples

    Send and receive items from a channel

    // Create a bounded channel with a max-size of 1
    let (s, r) = channel(1);
    
    // This call returns immediately because there is enough space in the channel.
    s.send(1).await;
    
    task::spawn(async move {
        // This call blocks the current task because the channel is full.
        // It will be able to complete only after the first message is received.
        s.send(2).await;
    });
    
    // Receive items from the channel
    task::sleep(Duration::from_secs(1)).await;
    assert_eq!(r.recv().await, Some(1));
    assert_eq!(r.recv().await, Some(2));
    

    โž• Added

    • โž• Added Future::delay as "unstable"
    • โž• Added Stream::flat_map as "unstable"
    • โž• Added Stream::flatten as "unstable"
    • โž• Added Stream::product as "unstable"
    • โž• Added Stream::sum as "unstable"
    • Added Stream::min_by_key
    • โž• Added Stream::max_by
    • โž• Added Stream::timeout as "unstable"
    • โž• Added sync::channel as "unstable".
    • โž• Added doc links from instantiated structs to the methods that create them.
    • Implemented Extend + FromStream for PathBuf.

    ๐Ÿ”„ Changed

    • ๐Ÿ›  Fixed an issue with block_on so it works even when nested.
    • ๐Ÿ›  Fixed issues with our Clippy check on CI.
    • Replaced our uses of cfg_if with our own macros, simplifying the codebase.
    • โšก๏ธ Updated the homepage link in Cargo.toml to point to async.rs.
    • ๐Ÿ“š Updated the module-level documentation for stream and sync.
    • โœ๏ธ Various typos and grammar fixes.
    • โœ‚ Removed redundant file flushes, improving the performance of File operations

    โœ‚ Removed

    ๐Ÿš€ Nothing was removed in this release.

  • v0.99.10 Changes

    October 16, 2019

    This patch stabilizes several core concurrency macros, introduces async versions of Path and PathBuf, and adds almost 100 other commits.

    Examples

    Asynchronously read directories from the filesystem

    use async_std::fs;
    use async_std::path::Path;
    use async_std::prelude::*;
    
    let path = Path::new("/laputa");
    let mut dir = fs::read_dir(&path).await.unwrap();
    while let Some(entry) = dir.next().await {
        if let Ok(entry) = entry {
            println!("{:?}", entry.path());
        }
    }
    

    โฑ Cooperatively reschedule the current task on the executor

    use async_std::prelude::*;
    use async_std::task;
    
    task::spawn(async {
        let x = fibonnacci(1000); // Do expensive work
        task::yield_now().await;  // Allow other tasks to run
        x + fibonnacci(100)       // Do more work
    })
    

    Create an interval stream

    use async_std::prelude::*;
    use async_std::stream;
    use std::time::Duration;
    
    let mut interval = stream::interval(Duration::from_secs(4));
    while let Some(_) = interval.next().await {
        println!("prints every four seconds");
    }
    

    โž• Added

    • โž• Added FutureExt to the prelude, allowing us to extend Future
    • โž• Added Stream::cmp
    • โž• Added Stream::ge
    • โž• Added Stream::last
    • โž• Added Stream::le
    • โž• Added Stream::lt
    • โž• Added Stream::merge as "unstable", replacing stream::join!
    • โž• Added Stream::partial_cmp
    • โž• Added Stream::take_while
    • โž• Added Stream::try_fold
    • โž• Added future::IntoFuture as "unstable"
    • โž• Added io::BufRead::split
    • โž• Added io::Write::write_fmt
    • โž• Added print!, println!, eprint!, eprintln! macros as "unstable"
    • โž• Added process as "unstable", re-exporting std types only for now
    • โž• Added std::net re-exports to the net submodule
    • โž• Added std::path::PathBuf with all associated methods
    • โž• Added std::path::Path with all associated methods
    • โž• Added stream::ExactSizeStream as "unstable"
    • โž• Added stream::FusedStream as "unstable"
    • โž• Added stream::Product
    • โž• Added stream::Sum
    • โž• Added stream::from_fn
    • โž• Added stream::interval as "unstable"
    • โž• Added stream::repeat_with
    • โž• Added task::spawn_blocking as "unstable", replacing task::blocking
    • โž• Added task::yield_now
    • โž• Added write! and writeln! macros as "unstable"
    • Stabilized future::join! and future::try_join!
    • โฑ Stabilized future::timeout
    • Stabilized path
    • Stabilized task::ready!

    ๐Ÿ”„ Changed

    • ๐Ÿ›  Fixed BufWriter::into_inner so it calls flush before yielding
    • ๐Ÿ”จ Refactored io::BufWriter internals
    • ๐Ÿ”จ Refactored net::ToSocketAddrs internals
    • โœ‚ Removed Travis CI entirely
    • Rewrote the README.md
    • Stabilized io::Cursor
    • Switched bors over to use GitHub actions
    • ๐Ÿ“š Updated the io documentation to match std's io docs
    • ๐Ÿ“š Updated the task documentation to match std's thread docs

    โœ‚ Removed

    • โœ‚ Removed the "unstable" stream::join! in favor of Stream::merge
    • โœ‚ Removed the "unstable" task::blocking in favor of task::spawn_blocking
  • v0.99.9 Changes

    October 08, 2019

    โฌ†๏ธ This patch upgrades our futures-rs version, allowing us to build on the 1.39 beta. Additionally we've introduced map and for_each to Stream. And we've โž• added about a dozen new FromStream implementations for std types, bringing us up to par with std's FromIterator implementations.

    And finally we've added a new "unstable" task::blocking function which can be ๐Ÿ‘‰ used to convert blocking code into async code using a threadpool. We've been using this internally for a while now to async-std to power our fs and net::SocketAddr implementations. With this patch userland code now finally has access to this too.

    Example

    Create a stream of tuples, and collect into a hashmap

    let a = stream::once(1u8);
    let b = stream::once(0u8);
    
    let s = a.zip(b);
    
    let map: HashMap<u8, u8> = s.collect().await;
    assert_eq!(map.get(&1), Some(&0u8));
    

    Spawn a blocking task on a dedicated threadpool

    task::blocking(async {
        println!("long-running task here");
    }).await;
    

    โž• Added

    • โž• Added stream::Stream::map
    • โž• Added stream::Stream::for_each
    • Added stream::Stream::try_for_each
    • โž• Added task::blocking as "unstable"
    • โž• Added FromStream for all std::{option, collections, result, string, sync} types.
    • โž• Added the path submodule as "unstable".

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated futures-preview to 0.3.0-alpha.19, allowing us to build on rustc 1.39.0-beta.
    • โฌ†๏ธ As a consequence of this upgrade, all of our concrete stream implementations now make use of Stream::size_hint to optimize internal allocations.
    • We now use GitHub Actions through actions-rs, in addition to Travis CI. We intend to fully switch in the near future.
    • ๐Ÿ›  Fixed a bug introduced in 0.99.6 where Unix Domain Listeners would sometimes become unresponsive.
    • โšก๏ธ Updated our sync::Barrier docs to match std.
    • โšก๏ธ Updated our stream::FromStream docs to match std's FromIterator.
  • v0.99.8 Changes

    September 28, 2019

    โž• Added

    • โž• Added README to examples directory.
    • โž• Added concurrency documentation to the futures submodule.
    • โž• Added io::Read::take method.
    • โž• Added io::Read::by_ref method.
    • โž• Added io::Read::chain method.

    ๐Ÿ”„ Changed

    • โฌ†๏ธ Pin futures-preview to 0.3.0-alpha.18, to avoid rustc upgrade problems.
    • Simplified extension traits using a macro.
    • ๐Ÿ”€ Use the broadcast module with std::sync::Mutex, reducing dependencies.
  • v0.99.7 Changes

    September 26, 2019

    โž• Added

    • โž• Added future::join macro as "unstable"
    • โž• Added future::select macro as "unstable"
    • โž• Added future::try_join macro as "unstable"
    • โž• Added future::try_select macro as "unstable"
    • โž• Added io::BufWriter struct
    • โž• Added stream::Extend trait
    • โž• Added stream::Stream::chain method
    • โž• Added stream::Stream::filter method
    • โž• Added stream::Stream::inspect method
    • โž• Added stream::Stream::skip_while method
    • โž• Added stream::Stream::skip method
    • โž• Added stream::Stream::step_by method
    • โž• Added sync::Arc struct from stdlib
    • โž• Added sync::Barrier struct as "unstable"
    • โž• Added sync::Weak struct from stdlib
    • โž• Added task::ready macro as "unstable"

    ๐Ÿ”„ Changed

    • ๐Ÿ“Œ Correctly marked the pin submodule as "unstable" in the docs
    • โšก๏ธ Updated tutorial to have certain functions suffixed with _loop
    • io traits are now re-exports of futures-rs types, allowing them to be implemented
    • stream traits are now re-exports of futures-rs types, allowing them to be implemented
    • prelude::* now needs to be in scope for functions io and stream traits to work
  • v0.99.6 Changes

    September 19, 2019

    โž• Added

    • โž• Added stream::Stream::collect as "unstable"
    • โž• Added stream::Stream::enumerate
    • โž• Added stream::Stream::fuse
    • โž• Added stream::Stream::fold
    • โž• Added stream::Stream::scan
    • โž• Added stream::Stream::zip
    • โž• Added stream::join macro as "unstable"
    • โž• Added stream::DoubleEndedStream as "unstable"
    • โž• Added stream::FromStream trait as "unstable"
    • โž• Added stream::IntoStream trait as "unstable"
    • โž• Added io::Cursor as "unstable"
    • โž• Added io::BufRead::consume method
    • โž• Added io::repeat
    • โž• Added io::Slice and io::SliceMut
    • โž• Added documentation for feature flags
    • โž• Added pin submodule as "unstable"
    • โž• Added the ability to collect a stream of Result<T, E>s into a Result<impl FromStream<T>, E>

    ๐Ÿ”„ Changed

    • ๐Ÿ”จ Refactored the scheduling algorithm of our executor to use work stealing
    • ๐Ÿ”จ Refactored the network driver, removing 400 lines of code
    • โœ‚ Removed the Send bound from task::block_on
    • โœ‚ Removed Unpin bound from impl<T: futures::stream::Stream> Stream for T
  • v0.99.5 Changes

    September 12, 2019

    โž• Added

    • โž• Added tests for io::timeout
    • ๐Ÿ“Š Added io::BufRead::fill_buf, an async fn counterpart to poll_fill_buf
    • Added fs::create_dir_all
    • โž• Added future::timeout, a free function to time out futures after a threshold
    • โž• Added io::prelude
    • โž• Added net::ToSocketAddrs, a non-blocking version of std's ToSocketAddrs
    • โž• Added stream::Stream::all
    • โž• Added stream::Stream::filter_map
    • โž• Added stream::Stream::find_map
    • โž• Added stream::Stream::find
    • โž• Added stream::Stream::min_by
    • โž• Added stream::Stream::nth

    ๐Ÿ”„ Changed

    • ๐Ÿ’… Polished the text and examples of the tutorial
    • cargo fmt on all examples
    • Simplified internals of TcpStream::connect_to
    • ๐Ÿ‘ท Modularized our CI setup, enabled a rustfmt fallback, and improved caching
    • โฌ‡๏ธ Reduced our dependency on the futures-rs crate, improving compilation times
    • Split io::Read, io::Write, io::BufRead, and stream::Stream into multiple files
    • ๐Ÿ‘€ fs::File now flushes more often to prevent flushes during seek
    • โšก๏ธ Updated all dependencies
    • ๐Ÿ›  Fixed a bug in the conversion of File into raw handle
    • ๐Ÿ›  Fixed compilation errors on the latest nightly

    โœ‚ Removed

  • v0.99.4 Changes

    August 21, 2019

    ๐Ÿ”„ Changes

    • โœ๏ธ Many small changes in the book, mostly typos
    • ๐Ÿ“š Documentation fixes correcting examples
    • Now works with recent nightly with stabilised async/await (> 2019-08-21)