wasi-gfx / wasi-gfx-runtime

46 stars 8 forks source link

Refactor: make graphics-context trait based #33

Closed MendyBerger closed 7 months ago

MendyBerger commented 7 months ago

This is a major refactor of the example-runtime. This is work to prepare the bindings to be usable as a library outside of our runtime. Main thing was making graphics-context use traits instead of enums, so that we don't only support a fixed amount of backends. Another big thing was changing the way events work. Each window-event now has it's own channel. Window creation is also happening on main thread. Also started work to implement wasmtime binding traits not directly on HostState, so that they can be used with other state objects.