3 ms·
sokol is great - I think of it as more of an "STB for apps". With renderlet/wander the goal is more to express graphics using higher level constructs and automa
by seanisom 3y ago
sokol is great - I think of it as more of an "STB for apps". With renderlet/wander the goal is more to express graphics using higher level constructs and automatically generate the runtime code behind it. For example, with the Wasm build of sokol you could build a canvas-style app that directly runs in a browser, whereas with renderlet you can build a function that can parametrically render grids that can be run in (any) app like that.
- flohofwoe 3y agoTBH I would love an extended WASI standard with 'media apis' (window, 3D, audio, input) to run sokol code compiled to WASM in without having to compile/distribute per-platform native apps. Deno seems to work on that idea [0], but having a WASI like standard would be better of course. [0] https://github.com/deno-windowing https://github.com/deno-windowing PS: How much work was it to "port" the Rive renderer? Would be great to see a blog post or similar about how you approached that and about any difficulties on the way :)
- mendyberger 3y agoThis? https://github.com/WebAssembly/wasi-webgpu https://github.com/WebAssembly/wasi-webgpu
- flohofwoe 3y agoYeah, but the 'wasi-canvas' part is really important to get something on screen (as opposed to "just" using WebGPU for compute-tasks). Also a simple wasi-audio API is needed (preferrably something less overengineered than WebAudio, just a simple sample-streaming API would be perfect).
- seanisom 3y ago+1 for Audio and lots of other APIs necessary to make WASI more like a true OS. With Preview 2 / Component model, hoping the pace of contributions rapidly increases.
- seanisom 3y agoAlso, with the solid foundation and simple API footprint you've built for APIs like sokol_audio, would be interesting to see if they could be expressed in WIT and used as a basis for something like a wasi-audio.
- boomskats 3y agoAre you involved at all with the Bytecode Alliance or the decisions around the WASI proposals/standards? It feels like your take on these things would be super valuable given all the work you've done. They're a very open minded group.
- seanisom 3y agoYes! wasi-webgpu is coming, as well as more APIs with wasi-gfx. Getting rive-renderer working was not hard because in the demo its running on the host side, and not in Wasm yet, although compiling for Windows/DX11 took some minor changes. Getting it fully working in Wasm outside of the browser looks to be non-trivial, but doable, but will likely require upstream changes.
- dartos 3y agoSo kind of like a graphics transpiler?
- seanisom 3y agoYes, that's a good mental model. Input - high-level description of graphics, output low-level graphics code running in Wasm.