-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Assembly Support #83
Comments
@Schr3da we haven't look into it, and don't know what the requirements/implications are. |
AFAICT, WASM has the same limitations as WebGL. If Three.rs can run using OpenGL ES 2.0, then it should compile to WASM just fine. I haven't tested this yet, but am digging into Three.rs for just this reason... |
I imagine there will only be a few issues to consider (all amendable) before WASM support can be a reality.
|
Note that gfx-0.17 has WebGL2 support, so we may be very close to get this going. |
is there any progress / timeline for this? |
@ForsakenHarmony we are currently stopped in a situation where Emscripten could possibly be gotten to work. The upstream PR unblocking it has landed only recently - emscripten-core/emscripten#5951 . However, Rust community/ecosystem appears to be moving in the direction of using Anyhow, a champion is always needed here in Three-rs to get things hooked up and tested. Jump on our gitter to chat about it if you want to lend a hand ;) |
I'm not sure if I could be of any use |
Any thoughts on this now that gfx-rs supports I'm interested and could possibly lend some time to implementing (although I'm a Rust newbie) if there is a good idea of what is required? |
Likewise to LordBenjamin. I'm experienced with THREE.js via Javascript, but new to Rust & WASM. Nonetheless, would like to contribute given sufficient guidance or examples to work from. |
@LordBenjamin it's an entirely different gfx-rs that now has basic support for This project needs a big leap in order to continue developing - moving from gfx pre-ll to wgpu-rs, which is modern, extremely portable, and has a similar level of abstraction. See #222. wgpu-rs is naturally going to be targeting the Web, even though today its capabilities are mostly focused on native. @vitvakatu earlier expressed interest in doing the port, but I'm not aware of any progress, so the task is still open for interested parties. |
Yeah, I got distracted by other tasks (and continue to be distracted), so I suppose someone else could try to do so. I can help with code reviews. |
@kvark / @vitvakatu - thanks for the info. Is there any detailed breakdown of what would need to be done to move to What sort of effort do you think the port would involve - days, weeks? |
It's a big multi-week effort. Steps can be described as follows:
Here is a similar effort that was done in the past - kvark/vange-rs#73 , to give you a sense of scale. |
How about we break it down further and assign chunks to willing owners? |
Basically you need to rewrite the whole I don't know how to break down such huge task. |
You could also cut out all the pipelines/shaders except for the most basic one to start with. But it still requires a lot of thinking up-front. Just rewriting the infrastructure we have is the biggest challenge, and it will probably need to be done in one go. @LordBenjamin @jpryne we greatly appreciate your interest in helping with this, and we'll be happy to provide guidance along the way. Just giving a fair warning that this is not an easy task, especially if you also need to learn about gfx pre-ll and wgpu-rs along the way. The way it could be done, I imagine is:
|
Fair enough. Possibly in over my head TBH - I have little Rust / gfx experience as I'm coming from a C# / DirectX and TypeScript / three.js background. I'm sure it would be an interesting ride and I would learn a lot by doing this. Appreciate your offers of guidance and code reviews. I don't want to commit to doing it and then waste your time with trivial questions either though. I'll have a bit more of a look into |
Yeah, I'm in the same boat. Chewing my way through lib.rs... |
Is web assembly initially planned?
The text was updated successfully, but these errors were encountered: