Hacker News new | ask | show | jobs
by chinedufn 2715 days ago
Ah interesting - so my thinking on this is:

- I see that I poorly communicated this in the title, but I was actually shooting less for "Rust/WASM makes this better!!" and more for "Hey, this is possible with pretty much just Rust/WASM!" I ended up hand writing about 10 lines of JS [1] in total

- More minor point - WebGL commands don't need to be called via JS [2] after anyref and host bindings land, and I think that it's important for people to know that it's possible to do things on the web without JS (whether that's a good idea is very situational)!

So yeah apologies if the title could be a bit better - but the main goal was to share with others that it's possible to build 3d experiences on the web with Rust today!

And - just to not come off wrong here - I'm not saying whether this is right or wrong and when to go this route. I am just interested in demonstrating how to do it :)

But all in all you're right - all of this same experience could totally be built with only JS if someone so desired!

[1] - https://github.com/chinedufn/webgl-water-tutorial/blob/maste...

[2] - https://github.com/WebAssembly/reference-types/blob/master/p...