Skip to content

Add synchronous path for tree optimization on wasm#936

Merged
Jondolf merged 1 commit intomainfrom
sync-rebuild-on-wasm
Feb 2, 2026
Merged

Add synchronous path for tree optimization on wasm#936
Jondolf merged 1 commit intomainfrom
sync-rebuild-on-wasm

Conversation

@Jondolf
Copy link
Member

@Jondolf Jondolf commented Feb 2, 2026

Objective

#927 broke wasm! It useds async tasks, and apparently you cannot use block_on there.

Solution

Perform tree optimization synchronously on wasm. I also added a use_async_tasks setting in case you want to disable it even in native contexts.

Testing

bevy run --example bvh web

@Jondolf Jondolf added this to the 0.6 milestone Feb 2, 2026
@Jondolf Jondolf added A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality P-Crash A sudden unexpected crash D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Feb 2, 2026
@Jondolf Jondolf enabled auto-merge (squash) February 2, 2026 16:06
@Jondolf Jondolf merged commit 72d5f02 into main Feb 2, 2026
6 checks passed
@Jondolf Jondolf deleted the sync-rebuild-on-wasm branch February 2, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality D-Straightforward Simple bug fixes and API improvements, docs, test and examples P-Crash A sudden unexpected crash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant