Skip to content

Commit

Permalink
Async channel v2 (#10692)
Browse files Browse the repository at this point in the history
# 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 #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>
  • Loading branch information
hymm and alice-i-cecile authored Jan 15, 2024
1 parent fcc1113 commit ee9a150
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_tasks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ee9a150

Please sign in to comment.