Re: Web Assembly, struct to JavaScript Object and back

2020-06-24 Thread tirithen via Digitalmars-d-learn
On Wednesday, 24 June 2020 at 10:53:19 UTC, Sebastiaan Koppe wrote: On Tuesday, 23 June 2020 at 18:15:25 UTC, tirithen wrote: [...] Passing anything besides int/double/bool between JS and wasm is hard work. [...] Thanks for a really good explanation, passing pointers over the structs

Re: Web Assembly, struct to JavaScript Object and back

2020-06-24 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Tuesday, 23 June 2020 at 18:15:25 UTC, tirithen wrote: Anyone that has something similar working with struct objects? Passing anything besides int/double/bool between JS and wasm is hard work. Currently the ABI generated by LDC is so that arguments besides int/double/bool (and

Web Assembly, struct to JavaScript Object and back

2020-06-23 Thread tirithen via Digitalmars-d-learn
I'm experimenting with generating wasm files with ldc2 but I'm having problems when trying to pass JavaScript Objects and receive them as structs and the other way around. I found this super nice getting started guide that works fine for basic types like double and so on