News for hackers. Stuff that matters.
Re:WASM: Big Deal or Little Deal? by paulgb on Tuesday September 05, 2023 @06:12AM (#37389886)
Accommodating in the sense that in a language where you control the memory layout of objects, you don’t have to explicitly do an explicit encoding step, you can just specify a memory layout that the GPU can understand. This makes it a lot nicer to work with in my experience.

Here’s an example of a Rust object with a layout that can be sent directly to a GPU buffer: https://github.com/paulgb/webgl2-glyph/blob/ef5a64a708856d67...

Re:WASM: Big Deal or Little Deal? by 3cats-in-a-coat on Tuesday September 05, 2023 @10:30AM (#37392192)
I wonder if you have an object whose state has that same schema tied to a DataView offset if it'd be much different tbh.
Re:WASM: Big Deal or Little Deal? by paulgb on Tuesday September 05, 2023 @11:36AM (#37393145)
You could create a JS object with accessor functions that stores an offset, but the object itself still takes up heap space. In Rust, it would just be a (typed) pointer to the position in the buffer and wouldn't require an allocation.
Re:WASM: Big Deal or Little Deal? by 3cats-in-a-coat on Tuesday September 05, 2023 @01:33PM (#37395094)
It's trivial to fix with an ECS layout, but the point is does it matter.