I'm currently playing around with wasm in combination with Python. When I looked at wasm bindgen it seemed very much geared towards JS interop. Therefore I started to look into using the wasm target without wrapper. However, I have trouble understanding the semantics of argument and return types.
I assume the primitives types that map directly to wasm (i32, i64, f32, f64) are mapped as is. Similary, I assume pointers map to i32. When I started to play around with more complex types it seems that the following types are also mapped to pointers (i32):
- returning (and accepting) Boxes (whereas Rc's seem to not work)
- mut and non-mut references
Since, I'm a bit afraid to simply go on trial and error to define my interface, I was wondering whether the semantics how Rusts maps arg and return types to wasm documented somewhere? Google and the forum search turned up empty.