Its been a while since I looked at using webassembly as a scripting language for modules in a larger program.

Has support been added for:

  1) types other than int, for example strings and what not without the hacks of passing string lengths and addresses?

  2) sharing of data.  That is can I declare a struct of some sort in the main program, pass that to the webassembly script, operate on it, and return it?  Last I looked at that the only thing I could come up with was passing it back and forth as a (pick your format here) json string.
> types other than int

Floating point values are also supported.

> for example strings and what not without the hacks of passing string lengths and addresses?

That's not so much a "hack" per se, so much as it is fundamentally how string types are represented when broken down into their basic components. ARM, x64, etc. interact with strings in similar ways. Tools like wasm-bindgen[1] generate JS wrappers around the raw WASM calls, which wrap the address+length APIs in string accepting ones. For non-JS hosts, you might have to roll your own boilerplate or boilerplate generators, but that's straightforward.

> sharing of data. That is can I declare a struct of some sort in the main program, pass that to the webassembly script, operate on it, and return it? Last I looked at that the only thing I could come up with was passing it back and forth as a (pick your format here) json string.

Multiple WASM instances can share a single memory instance without copying data. A non-wasm host will typically copy/serialize data into/out-of WASM memory for simplicitly/convenience/durability, but there are APIs[2][3] that let you directly manipulate WASM memory - and there's nothing stopping you from generating identical structures on both ends and directly using them without copying.

[1]: https://github.com/rustwasm/wasm-bindgen

[2]: https://docs.rs/wasmer/latest/wasmer/struct.Memory.html#meth...

[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...