cloudpeers / ffi-gen

Call rust from any language.
20 stars 5 forks source link

WASM: fix sending i8/u8/i16/u16 #34

Closed wngr closed 2 years ago

wngr commented 2 years ago

https://github.com/cloudpeers/ffi-gen/pull/33#discussion_r762188059

wngr commented 2 years ago

I guess this doesn't matter much, as the wasm stack machine does not support u8 num types. For dart we still use u8.

dvc94ch commented 2 years ago

Well in the unlikely case someone really wants to return a u8 there's nothing stopping them, and they'll run into trouble. Maybe we can lower u8 and u16 as i32 on wasm?