async_executors 0.2.0

Implements Spawn, SpawnLocal and SpawnHandle for commonly used executors.
Documentation
package:

  # When releasing to crates.io:
  #
  # - Update CHANGELOG.md.
  # - Update version numbers in Cargo.yml, Cargo.toml, install section of readme.
  # - verify CI result
  # - test dependent crates
  # - cargo publish
  # - merge dev branch into master
  # - create git tag
  #
  version       : 0.2.0
  name          : async_executors
  authors       : [ Naja Melan <najamelan@autistici.org> ]
  description   : Implements Spawn, SpawnLocal and SpawnHandle for commonly used executors.
  documentation : https://docs.rs/async_executors
  repository    : https://github.com/najamelan/async_executors
  readme        : README.md
  keywords      : [async, executor, futures]
  categories    : [asynchronous, concurrency]
  license       : Unlicense
  edition       : "2018"

  metadata:
    docs:
      rs:
        all-features: true


# Please see the readme for details.
#
features:

  # The `notwasm` feature only exists so that cargo test doesn't try to compile the examples when testing
  # wasm.
  #
  default   : [ notwasm ]

  # Enables the async-std task executor. Not available on WASM.
  #
  async_std : [ async_std_crate ]

  # Enables the tokio current_thread executor. Not available on WASM.
  #
  tokio_ct  : [ tokio/rt-core, tokio/rt-util ]

  # Enables the tokio thread_pool executor. Not available on WASM.
  #
  tokio_tp  : [ tokio/rt-threaded, parking_lot ]

  # Enables the wasm-bindgen-futures executor. Only available on WASM. If no other executors are enabled
  # this will be enabled by default. Currently the only executor available on WASM, so it makes no sense
  # for it not to be enabled, and it's providing dependency wasm-bindgen-futures will always be compiled in.
  #
  bindgen   : [ wasm-bindgen-futures ]

  # Add support for the futures LocalPool to SpawnHandle and LocalSpawnHandle
  # only makes sense in conjunction with spawn_handle.
  #
  localpool: [ futures-executor ]

  # Add support for the futures ThreadPool to SpawnHandle and LocalSpawnHandle
  # only makes sense in conjunction with spawn_handle.
  #
  threadpool: [ futures-executor/thread-pool ]

  # Enable integration with tracing-futures. This implements the SpawnHandle family of traits
  # on wrapped executors Instrumented<T> and WithDispatch<T>.
  #
  tracing: [ tracing-futures ]

  # Provide an executor agnostic JoinHandle and the SpawnHandle family of traits.
  # Remove pin-utils, futures-core and futures-channel when no longer vendoring remote_handle.
  # Depends on: https://github.com/rust-lang/futures-rs/pull/2081
  #
  spawn_handle: [ futures-util, futures-channel, futures-core, pin-utils ]

  # only used internally, don't use
  #
  notwasm: []

  docs: []


badges:

  maintenance : { status     : actively-developed        }
  travis-ci   : { repository : najamelan/async_executors }


dependencies:

  # Public deps
  #
  futures-task        : { version: ^0.3                                         }
  futures-util        : { version: ^0.3, optional: true                         }
  tracing-futures     : { version: ^0.2, optional: true, features: [futures-03] }
  futures-executor    : { version: ^0.3, optional: true                         }

  # Private deps
  #
  async_std_crate     : { version: ^1   , optional: true, package: async-std }
  tokio               : { version: ^0.2 , optional: true                     }
  parking_lot         : { version: ^0.10, optional: true                     }

  # only while vendoring remote_handle from futures_util
  #
  pin-utils           : { version: 0.1.0-alpha, optional: true }
  futures-channel     : { version: ^0.3       , optional: true }
  futures-core        : { version: ^0.3       , optional: true }

  # necessary for the crate to compile for `cargo doc`
  #
  wasm-bindgen-futures: { version: ^0.4, optional: true }


dev-dependencies:

  pretty_assertions : ^0.6
  static_assertions : ^1
  futures           : { version: ^0.3, features: [ thread-pool ] }
  # log               : ^0.4
  # flexi_logger      : ^0.11


target:

  'cfg(target_arch = "wasm32")':

    dev-dependencies:

      wasm-bindgen-test: ^0.3


example:

  - name             : async_std
    path             : examples/async_std.rs
    required-features: [ notwasm, async_std ]

  - name             : tokio_ct
    path             : examples/tokio_ct.rs
    required-features: [ notwasm, tokio_ct ]

  - name             : tokio_tp
    path             : examples/tokio_tp.rs
    required-features: [ notwasm, tokio_tp ]

  - name             : spawn_handle_multi
    path             : examples/spawn_handle_multi.rs
    required-features: [ notwasm, spawn_handle, async_std ]