Support for wasm-bindgen #277
FrankenApps
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
|
This seems like a reasonable request, however I don't know much about how Would there be a way to automate testing of this? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I think it would be great if
glamcould expose a feature that would allow passing theVecs andMats viawasm-bindgen, similar to how the integration withserdealready works.In my opinion this feature would be useful, because I can imagine that there is a whole potential user base that needs fast SIMD accelerated linear algebra in the browser or in nodejs.
Without this feature I had to resort to implementing my own wrapper types just for passing the values from javascript to webassembly:
using something like this it now becomes possible to use the
Vector4in javascript for example like this:and then I use
to_vec4()to convert it to an actualglam::Vec4.I think having built-in support for at least this basic use case of passing values around would probably be quite beneficial for some users. I am however not sure if it would make sense to also expose all the associated functions to wasm. This almost feels like it would be a bit to much, but I am not sure.
If you can give me a hint on how to specify the
wasm-bindgenattribute on for example aVec4and if you would be interested in that feature I could go ahead and make a Draft PR for this...Beta Was this translation helpful? Give feedback.
All reactions