wasmerio / wasmer-php

🐘🕸️ WebAssembly runtime for PHP
https://wasmerio.github.io/wasmer-php/wasm/
MIT License
1k stars 42 forks source link

Supported types #80

Closed omid closed 5 years ago

omid commented 5 years ago

Hey,

Thanks for your awesome work. :-)

Where can I find the supported types between PHP and WASM? For example, I want to see if a wasm function can return a PHP associative array or not.

Hywan commented 5 years ago

Hello,

This is not yet possible. WebAssembly supports i32, i64, f32 and f64 only, and it won't change. We are working with other WebAssembly engineers on WIT (WebAssembly Interface Types, https://github.com/WebAssembly/interface-types), to support more types “natively”/transparently. It should land soon :-).

omid commented 5 years ago

Cool, looking forward to using that