Async channel v2 (#10692)

# Objective

- Update async channel to v2.

## Solution

- async channel doesn't support `send_blocking` on wasm anymore. So
don't compile the pipelined rendering plugin on wasm anymore.
- Replaces https://github.com/bevyengine/bevy/pull/10405

## Migration Guide
- The `PipelinedRendering` plugin is no longer exported on wasm. If you
are including it in your wasm builds you should remove it.

```rust
#[cfg(all(not(target_arch = "wasm32"))]
app.add_plugins(bevy_render::pipelined_rendering::PipelinedRenderingPlugin);
```

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
Mike 2024-01-15 11:23:00 -08:00 committed by GitHub
parent fcc1113ec8
commit ee9a1503ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View file

@ -21,7 +21,7 @@ bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
bevy_ecs_macros = { path = "macros", version = "0.12.0" }
async-channel = "1.4"
async-channel = "2.1.0"
thread_local = "1.1.4"
fixedbitset = "0.4.2"
rustc-hash = "1.1"

View file

@ -88,7 +88,7 @@ encase = { version = "0.7", features = ["glam"] }
profiling = { version = "1", features = [
"profile-with-tracing",
], optional = true }
async-channel = "1.8"
async-channel = "2.1.0"
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3"

View file

@ -14,6 +14,7 @@ pub mod extract_resource;
pub mod globals;
pub mod gpu_component_array_buffer;
pub mod mesh;
#[cfg(not(target_arch = "wasm32"))]
pub mod pipelined_rendering;
pub mod primitives;
pub mod render_asset;

View file

@ -14,7 +14,7 @@ multi-threaded = []
[dependencies]
futures-lite = "2.0.1"
async-executor = "1.7.2"
async-channel = "1.4.2"
async-channel = "2.1.0"
async-io = { version = "2.0.0", optional = true }
async-task = "4.2.0"
concurrent-queue = "2.0.0"