Wasm32 webgl calls w/o js interaction?

I'm using wasm32/webgl in a similar way to https://github.com/koute/stdweb/blob/master/examples/webgl/src/main.rs#L108-L133

Question: do these webgl calls go through js? If so, is there a way to make webgl calls directly from wasm32?

with current browsers all webgl (and other browser object) calls have to go through js; although it tends to be optimized very well, it's still a source of overhead

there's a host bindings proposal which will improve this in the future: https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md

Yes, No. (Maybe in future it will change.)

It is possible to write more performant js code that calls into custom wasm. (vs that generated.) The unanswered question is whether such a change is insignificant or not. Don't know of anyone explicitly testing.

that's a good point—i'm not sure it's that much of an overall performance issue with modern GL use, which tends to limit the number of calls into the driver by using buffer objects and such—making it likely it will be bottlenecked on the GPU, not the CPU