WebAssembly currently have only four primitive types, namely
F64. There is a proposal for "interface types" however as it's currently unstable and not standardized custom types and structs are handled in QANs execution engine trough CBOR serialization.
Functions with primitive bodies are exported as they are into a standard WASM export.
Functions with complex types (such as strings or user-defined structs) are wrapped into a (de)serializer function first. This step is hidden from contract developers and users and only the QAN-specific execution engine should ever call these internal functions directly.
External functions calls are provided to contracts trough WebAssembly "imports", and QAN's VM consists several of these, for example "REVERT", "CALL" etc.
QAN currently is capable of executing any WASM binary as a contract, meaning any language that can produce these is supported as long as they are not undeterministic. Note that WASI is not supported
QAN also provides SDKs with common types and annotators to ease contract development for the following languages: