https://hacks.mozilla.org/2019/08/webassembly-interface-type...
For the specific goal of working with Strings in rust and assemblyscript I've created this project: https://github.com/onsails/wasmer-as.
> Actually, humans generally think in terms of graphemes, which may or may not be composed of multiple Unicode code points (irrespective of the normalization form being used).
- why so many tech users use medium to write tech articles and not ghost, wix, tumblr or a wordpress provider?
- why so many people post links to article from medium?
Unless we answers those questions and provide an alternative can we destroy it, otherwise people will just keep doing that.
I guess that is the reason why all four major browsers cloud adopt it almost in the same time, without having many proposal ping-pongs between Google vs Mozilla vs Apple vs Microsoft.
And those other languages don't agree what a string looks like.
So do you have a Rust string? Or a C string? Or a C# string? Or one of the other representations?
By just giving you a bunch of bytes to play with, and letting different languages use them differently, WebAssembly stays out of the way and lets the compiler decide how it wants to make strings.
It doesn't appear to do even that though. You get i32, i64, f32, and f64. The linear memory is some multiple of the 64KiB page size.
I mean, any integer with 8+ bits can be treated like an octet, but memory layout is very different (e.g. an array of i8 and an array of i32 look very different even if they represent the same values).