Thank you for asking, Corentin :)
Unfortunately, React Native does not support NodeAPI. We didn't want
to reinvent the wheel, so we did the following:
1. We codegen the bindings from the @types/webgpu. This gives us
something very similar to interop:: (we also use C++ templates; there
are some differences here and there, but nothing too big). It looks
like generating from webidl would have been less work in the end, but
I was confused about where to find/how to process these files.
2. We are using Converter.cpp from the Node bindings. Again, there are
some small differences here and there, but overall it's the same code.
3. We did something really fun. We run our JS test suite against
Google Chrome to generate the reference results and then run it on
iOS/Android:
https://x.com/wcandillon/status/1815853573583827447
So yes, we didn't use the Node binding directly, but we didn't go too
much off-script either, which I think is good. I would love to reduce
these differences as much as possible. There are probably lots of
things we could refine there.
This is how it looks:
https://x.com/wcandillon/status/1817552920193237398
We will open-source it in two weeks or so.
Kind regards,
William