tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
14.73k stars 859 forks source link

What happened to `-wasm-abi=generic`? #4229

Closed SeaRoll closed 2 months ago

SeaRoll commented 2 months ago

Hi!

I saw that some projects use this argument for building called -wasm-abi=generic. Is there a reason why this was removed? I tried searching in changelogs but couldnt find anyhting related to this. I might be just blind but had to ask.

aykevl commented 2 months ago

It was removed, because it wasn't doing what people thought it did. And it's not necessary anymore. See: https://github.com/tinygo-org/tinygo/pull/3695

The only thing it did was change the way that i64 values were exposed in the public API: either as a regular i64 or as a pointer to an i64 (to work around the lack of i64 in browsers back then). Nowadays browsers support BigInt, which is how i64 is mapped to JavaScript.