mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
a6a5cbbd3c27f722287d8b516512c47c4e9a26cf
685: Replace futures crate with pollster. r=grovesNL a=parasyte This PR removes all of the `futures` dependencies. `std::future` does not contain a lot of useful helpers available in `futures`. The obvious ones are `join_all`, `FutureExt::map`, and `block_on`. - `join_all` is replaced with a `Vec<T>` and an `async` block. - `FuturesExt::map` in the web backend is replaced by rolling the `map` function into the `MakeSendFuture` type. - `block_on` is provided by `pollster`. The original code using `join_all` ignored the result type yielded by the Future from `map_async`. This code does the same, but makes dropping the result a little more obvious. These should not be troublesome. Figured I would call them out anyway. The last big change is replacing `futures-executor` in the examples with `async-executor`. A new concrete `Spawner` type is used in the example framework instead of an implementation of `futures_task::LocalSpawn`. Fixes #628 Co-authored-by: Jay Oster <jay@kodewerx.org>
Description
No description provided
Languages
Rust
79.9%
WGSL
16.2%
HLSL
2%
GLSL
1.7%
JavaScript
0.2%