You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
— returns in JavaScript: ["foo",5,true,["bar",6,false,null]].
Should probably be postponed until #138 is solved; otherwise, we'll break interop with tasks of custom data types, that are currently serialized to JSON.
We can actually send arrays as objects:
After testing, it doesn't seem worth it, as perf and min build size are roughly the same, while it adds more pressure to GC due to array allocations and it's not clear whether it's possible to support recursive types marshaling. It also adds limitations on the init scenarios of the marshaled types, eg it's not possible to use constructor overloads, as we're not storing parameter names.
Instead of JSON, explore marshaling via arrays, similar to Embind (https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#value-types), eg:
And the other way around:
— returns in JavaScript:
["foo",5,true,["bar",6,false,null]]
.Should probably be postponed until #138 is solved; otherwise, we'll break interop with tasks of custom data types, that are currently serialized to JSON.We can actually send arrays as objects:
— the task value is transferred to JavaScript as
["foo",7,true,["bar",8,false,null]]
.The text was updated successfully, but these errors were encountered: