Skip to content

In memory representation of complex types/universal data format #1272

@olanod

Description

@olanod

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions