Maybe is too much to ask or this may go in a different place but wouldn't it be nice if wasm supported natively complex object structures via a universal data format?
The linear memory model plays well with 0-copy serialization formats like flatbuffers or cap'nProto, imagine there is a standardized faltbuffers-like data format that is used all over the place like JSON nowadays, it would come with its tooling for every language like the mentioned formats but everything in a web standards way, to send data over the wire you just specify the offset+length of your data structure and off it goes without any serialization step. So far this looks very achievable with the current tools out there but it could be integrated more deeply into the platform and compilers. Say I have some struct defined in language X, compiler of that language could generate a wasm file with a header that defines the types used and any static structure in the stack serialized in that standard way, language B can instantiate those structures matching it to it's own types and syntax or generate code based on those type headers.
Does something like that make sense?
Maybe is too much to ask or this may go in a different place but wouldn't it be nice if wasm supported natively complex object structures via a universal data format?
The linear memory model plays well with 0-copy serialization formats like flatbuffers or cap'nProto, imagine there is a standardized faltbuffers-like data format that is used all over the place like JSON nowadays, it would come with its tooling for every language like the mentioned formats but everything in a web standards way, to send data over the wire you just specify the offset+length of your data structure and off it goes without any serialization step. So far this looks very achievable with the current tools out there but it could be integrated more deeply into the platform and compilers. Say I have some struct defined in language X, compiler of that language could generate a wasm file with a header that defines the types used and any static structure in the stack serialized in that standard way, language B can instantiate those structures matching it to it's own types and syntax or generate code based on those type headers.
Does something like that make sense?