-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
wasm? #657
Comments
It should be very close now, I don't think there should be any more major blockers! Just a matter of someone taking the time to have a crack at it. There will likely be a few small unforeseen tweaks or changes that we or our dependencies need to make to be totally compatible, but no deal-breakers that I can think of now that wgpu is running in the browser. Also discussed in #475 |
That's promising to hear, so who do we need to poke to get this happening? |
I think the conrod suite 0.71 is required. They closed PistonDevelopers/conrod#1381 recently, so if we asked them kindly, they might release version 0.71. |
@Woyten I'm relatively new to rust/nannou, but let me know if there's something I can help with in this regard. I'm in the process of getting into some creative projects and would like to be able to present some interactive WASM projects with nannou on my portfolio website. |
@AJTJ I am working on a microtonal modular synthesizer/sequencer/audio workstation which I hope to be able to deploy as a web app soon. Since, as of now, Nannou isn't wasm-compatible the graphical interface of the synthesizer isn't running on the web yet. I managed, however, to get the audio model running which can be explored here: http://woyten.github.io/microwave/?arg=steps&arg=1:22:2. The given URL will create a synthesizer instance tuned to 22 notes per octave as an example. There are a lot of things that can be done to support https://github.com/woyten/tune many of which I did not create an issue for. If there is some interest in contributing to the lib or the synth I will create more issues as an orientation. |
@Woyten very cool project. I would be interested in helping a bit here and there if you clarified some issues. Any future goals for this project? Product? Copyleft? |
@mitchmindtree is there something I can do to help wasm move forwards? If you could point me at some achievable issues I'd love to help out. |
Here are some thoughts on how I would go about getting this working. I'd start by trying to get a simple-as-possible wgpu-rs example that has already been demonstrated to work well in the browser locally, to verify that it's at least possible on my setup. Keep in mind that the current nannou master uses wgpu 0.5, so it might be worth testing the wgpu example with 0.5 too. Alternatively, if it seems like wgpu 0.6 is needed, #655 looks to be most of the way there (haven't had a chance to do a full review just yet). Once working, I would try to make a copy of the example, and add nannou as a dependency. Doing this should include nannou in the build process for the WASM target, and any remaining issues should be raised by the compiler as an error. There shouldn't be any major blockers, but this will help to guide towards what remains that needs addressing. The wgpu-users channel on Matrix is also full of very helpful folks - I highly recommend hanging out there while hacking on this :) They've been a great help in landing wgpu in nannou in general. I hope some of this helps a little bit! |
@mitchmindtree will look into this |
@mitchmindtree so it seems like this issue is rather deep Trying to get the Here are the examples: https://wgpu.rs/examples/?example=hello-triangle I've only attempted to get it working with Firefox Nightly, setting the various flags as required here: https://github.com/gpuweb/gpuweb/wiki/Implementation-Status#firefox But it seems to only want to crash. Here are similar bug reports of this issue with Firefox: https://bugzilla.mozilla.org/buglist.cgi?product=Core&component=Graphics%3A%20WebGPU This is where this is at currently. |
Thanks for digging into this @AJTJ! Ahh I thought WebGPU in browsers might have progressed a bit further by now, but I guess it's still early days. Perhaps we can at least prepare using firefox nightly best we can in the meantime. |
@mitchmindtree I saw that you merged this 20 days ago Does this move us forwards somehow? Hope all is well. |
@AJTJ Upgrading to wgpu-0.6 is not sufficient. See my comment. We need at least wgpu-0.7.0 and some new not yet published conrod_wgpu Version that depends on wgpu-0.7.0. A step towards making nannou compile against wasm is #715. |
I'll try to update it here, though I'm stuck with some cryptic error...: PistonDevelopers/conrod#1410 |
Just want to note that @mitchmindtree and @yutannihilation did update conrod wgpu to 0.7 at PistonDevelopers/conrod#1413 Steps towards wasm :) |
@mitchmindtree @Woyten how goes the progress towards wasm? :) Perhaps I can look at something? |
I haven't personally had a chance to dig into this yet - but I think we must be getting close. There's also a wgpu 0.8 update which I think is just about ready to merge #737 which I imagine would only take us a step closer. @Woyten pointed out some remaining required steps here, and also has a WIP PR here which they might appreciate some help with. |
@mitchmindtree any news on this one? :) |
I just made a template repo based on @Woyten 's implementation and rustwasm's template. https://github.com/tomoyanonymous/nannou-web-template It's working nicely both on the native app and the latest version of Chrome without any flag! |
should this be closed? looks like it's working... |
Similar template for vite: I think it should stay open as you currently still need to pick a non-release commit that has the |
Looks like there are a number of issues open on the subject of WASM. Given that this thread links to working versions, I assume that the original comments in #7 which suggest that it won't work have been superseded? But after reading #939 I suppose that we cannot expect any stable release any time soon? I'm currently looking for a creative coding framework that runs in a browser but that isn't in JS. Rust would have been very nice as the backend which provides the data is in Rust, too, which would have enabled me to stick to one language. |
Hi! We are currently working on #953, which will continue take some time but should improve our ability to support wasm as this is a big goal of bevy itself. So, stay tuned. :) |
It seems like wgpu is running in the browser as per: gfx-rs/wgpu-rs#193 , does nannou allow you to run its sketches/apps in the browser yet?
The text was updated successfully, but these errors were encountered: