2 ms·
Ideally you wouldn't use SDL at all, you would use equivalent native Rust libraries like winit for windowing and wgpu for graphics, which all work with wasm32-u
by jsheard 3y ago
Ideally you wouldn't use SDL at all, you would use equivalent native Rust libraries like winit for windowing and wgpu for graphics, which all work with wasm32-unknown-unknown.
- FullyFunctional 3y agoSure. Any suggestions? (I don’t need much, just kbd input and pixel graphics out)
- jsheard 3y agohttps://github.com/rust-windowing/softbuffer https://github.com/rust-windowing/softbuffer That gives you a simple software framebuffer, and it builds as a native app or for the web. You'd set up a window (or web canvas) using winit, then pass that to softbuffer so it can render to it. https://trunkrs.dev https://trunkrs.dev I think Trunk is the most streamlined way of building for the web at the moment, superseding wasm-pack.
- awwsmm 3y agoIt has been a huge pain trying to get SDL2 to play nicely with Android / iOS. Would winit / wgpu make this easier?