1package: 2 3 # When releasing to crates.io: 4 # 5 # - last check for all TODO, FIXME, expect, unwrap, todo!, unreachable!. 6 # - recheck log statements (informative, none left that were just for development, ...) 7 # - `cargo +nightly doc --no-deps --all-features --open` and re-read and final polish of documentation. 8 # 9 # - Update CHANGELOG.md. 10 # - Update version numbers in Cargo.yml, Cargo.toml, install section of readme. 11 # 12 # - `touch **.rs && cargo clippy --tests --examples --benches --all-features` 13 # - `cargo update` 14 # - `cargo outdated --root-deps-only` 15 # - `cargo audit` 16 # - `cargo udeps --all-targets --all-features` 17 # - `cargo crev crate verify --show-all --recursive` and review. 18 # - 'cargo test --all-targets --all-features' 19 # 20 # - push dev and verify CI result 21 # - check code coverage 22 # - `cargo test` on dependent crates 23 # 24 # - cargo publish 25 # - `git checkout master && git merge dev --no-ff` 26 # - `git tag x.x.x` with version number. 27 # - `git push && git push --tags` 28 # 29 version : 0.4.2 30 name : async_executors 31 authors : [ Naja Melan <najamelan@autistici.org> ] 32 description : Implements Spawn, SpawnLocal and SpawnHandle for commonly used executors. 33 documentation : https://docs.rs/async_executors 34 repository : https://github.com/najamelan/async_executors 35 readme : README.md 36 keywords : [ async, executor, futures ] 37 categories : [ asynchronous, concurrency ] 38 license : Unlicense 39 edition : '2018' 40 resolver : '2' 41 exclude : [ examples, tests, TODO.md, deny.toml, .travis.yml, CONTRIBUTING.md ] 42 43 metadata: 44 docs: 45 rs: 46 all-features: true 47 targets : [] 48 49 50 51# Please see the readme for details. 52# 53features: 54 55 # The `notwasm` feature only exists so that cargo test doesn't try to compile the examples when testing 56 # wasm. Ignore. 57 # 58 default : [ notwasm ] 59 60 61 # Turn on futures-timer. This will provide timer functionality for executors 62 # that don't have it built in: AsyncGlobal, Bindgen, LocalPool, ThreadPool. 63 # Will also implement Timer on tokio executors if the tokio_timer feature is not enabled. 64 # 65 timer : [ futures-timer ] 66 67 # Enable integration with tracing-futures. This implements the SpawnHandle, 68 # Io and Timer traits on wrapped executors Instrumented<T> and WithDispatch<T>. 69 # 70 tracing: [ tracing-futures ] 71 72 73 ### Executors ### 74 75 # Add support for the executor from async-global-executor. 76 # 77 async_global: [ async-global-executor ] 78 79 # Make sure async-io is enabled on async-global-executor. 80 # This will implement TokioIo on AsyncGlobal. Not available on Wasm. 81 # 82 async_global_tokio: [ async_global, async-global-executor/tokio ] 83 84 85 # Enables the async-std task executor. 86 # Also implements the AsyncIo and Timer traits. Currently async-io is always loaded when 87 # async-std is. See: https://github.com/async-rs/async-std/issues/975 88 # 89 async_std : [ async_std_crate ] 90 91 # Makes sure the tokio reactor is running. Implements TokioIo for AsyncStd. 92 # Not available on Wasm. 93 # 94 async_std_tokio : [ async_std, async_std_crate/tokio1 ] 95 96 97 # Enables the tokio current_thread executor. Not available on Wasm. 98 # 99 tokio_ct : [ tokio/rt ] 100 101 # Enables the tokio thread_pool executor. Not available on Wasm. 102 # 103 tokio_tp : [ tokio/rt-multi-thread ] 104 105 # Make sure a tokio reactor is running. 106 # This implements the TokioIo trait on the two tokio executors. 107 # 108 tokio_io: [ tokio/net, tokio/process ] 109 110 # Enable tokio timer functionality. Implements the Timer trait 111 # it on tokio executors. 112 # 113 tokio_timer: [ tokio/time ] 114 115 116 # Enables the wasm-bindgen-futures executor. Only available on Wasm. 117 # If feature timer is enabled, this will implement Timer trait on Bindgen. 118 # 119 bindgen : [ wasm-bindgen-futures ] 120 121 122 # Enabled the glommio executor. Linux only. Requires kernel 5.8+. 123 # GlommioCt implements Timer and GlommioIo. 124 # 125 glommio : [ glommio_crate ] 126 127 128 # Add support for the futures LocalPool to SpawnHandle and LocalSpawnHandle. 129 # LocalPool will implement Timer if the timer feature is enabled. 130 # 131 localpool: [ futures-executor ] 132 133 # Add support for the futures ThreadPool to SpawnHandle and LocalSpawnHandle. 134 # ThreadPool will implement Timer if the timer feature is enabled. 135 # 136 threadpool: [ futures-executor/thread-pool ] 137 138 139 140 # only used internally, don't use 141 # 142 notwasm: [] 143 144 145badges: 146 147 maintenance : { status : actively-developed } 148 travis-ci : { repository : najamelan/async_executors } 149 150 151dependencies: 152 153 # Public deps 154 # 155 futures-core : { version: ^0.3 } 156 futures-task : { version: ^0.3 } 157 futures-util : { version: ^0.3, features: [ channel ] } 158 futures-executor : { version: ^0.3, optional: true } 159 futures-timer : { version: ^3 , optional: true } 160 tracing-futures : { version: ^0.2, optional: true, features: [futures-03] } 161 glommio_crate : { version: ^0.4, optional: true, package: glommio } 162 tokio : { version: ^1 , optional: true } 163 164 # Private deps 165 # 166 async-global-executor : { version: ^2 , optional: true, default-features: false } 167 async_std_crate : { version: ^1.6 , optional: true, package: async-std, features: [ unstable ] } 168 pin-project : ^1 169 blanket : ^0.2 170 171 # necessary for the crate to compile for `cargo doc` 172 # 173 wasm-bindgen-futures: { version: ^0.4, optional: true } 174 175 176dev-dependencies: 177 178 static_assertions : ^1 179 futures : { version: ^0.3, features: [ thread-pool ] } 180 tracing-subscriber: { version: ^0.2, default-features: false, features: [ fmt ] } 181 tracing_crate : { version: ^0.1, package: tracing } 182 trait-set : ^0.2 183 184 185build-dependencies: 186 187 rustc_version: ^0.4 188 189 190profile: 191 192 release: 193 194 codegen-units: 1 195 196 197target: 198 199 'cfg(target_arch = "wasm32")': 200 201 202 dependencies: 203 204 futures-timer: { version: ^3, features: [wasm-bindgen], optional: true } 205 206 dev-dependencies: 207 208 wasm-bindgen-test: ^0.3 209 210 211 212 'cfg(not(target_os = "unknown"))': 213 214 dev-dependencies: 215 216 tokio : { version: ^1, features: [ io-util, net ] } 217 futures-timer : ^3 218 219 220 221example: 222 223 - name : async_std 224 path : examples/async_std.rs 225 required-features: [ notwasm, async_std ] 226 227 - name : tokio_ct 228 path : examples/tokio_ct.rs 229 required-features: [ notwasm, tokio_ct ] 230 231 - name : tokio_tp 232 path : examples/tokio_tp.rs 233 required-features: [ notwasm, tokio_tp ] 234 235 - name : spawn_handle_multi 236 path : examples/spawn_handle_multi.rs 237 required-features: [ notwasm, async_std ] 238 239 - name : trait_set 240 path : examples/trait_set.rs 241 required-features: [ notwasm, async_std ] 242 243 - name : tracing 244 path : examples/tracing.rs 245 required-features: [ notwasm, tracing, async_std ] 246 247 - name : glommio_ct 248 path : examples/glommio_ct.rs 249 required-features: [ notwasm, glommio ] 250 251 - name : timer 252 path : examples/timer.rs 253 required-features: [ notwasm, async_std, tokio_ct, tokio_timer ] 254 255 - name : tokio_io 256 path : examples/tokio_io.rs 257 required-features: [ notwasm, async_global_tokio, async_std_tokio, tokio_ct, tokio_io ] 258 259 - name : yield_now 260 path : examples/yield_now.rs 261 required-features: [ notwasm, tokio_ct ] 262