Commit 4c83b4e
fix: Rename
* fix: Rename `Dispatcher` global name to avoid conflicts with Nitro
Since WebGPU uses an early copy of Nitro (kinda like a fork), there are some conflicts that users will run into when they install WebGPU in an app that already has Nitro Modules installed (or other way around).
An official full fix would be to migrate WebGPU to Nitro, not only for better maintenance, but also for better performance and stability. I really don't think the migration is a huge effort.
For now, this PR fixes the name of the `Dispatcher` that is injected into global, as Nitro uses the same name and when one of the two Nitro versions downcasts the global into the specific C++ symbol, we have conflics since it's two different C++ symbols - it's either `nitro::margelo::Dispatcher` (the official one) or the WebGPU `margelo::Dispatcher`.
It's essentially a race condition with no clear error log since its just a C++ pointer cast that fails (super hard to debug lol)
Fixes #270
* Bump version from 0.2.9 to 0.2.10
---------
Co-authored-by: William Candillon <wcandillon@gmail.com>Dispatcher global name to avoid conflicts with Nitro (#271)1 parent 26236f2 commit 4c83b4e
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments