logoalt Hacker News

outside1234yesterday at 5:32 PM3 repliesview on HN

I mean can't we say the same thing about sending around a .exe though?


Replies

bluejekyllyesterday at 5:37 PM

.exe has bindings to OS ABI and system calls, WASM doesn’t have this by default, it’s up to the VM to provide whatever environment the WASM executable needs, ideally there should be no system calls, no stdio, just instructions on how to interpret the file format.

gavinrayyesterday at 5:35 PM

Double-clicking an ".exe" (or running it via a shell) is not the same as "bag of bytes", it's "send these bytes to an executable environment".

Doing `head foo.exe` is quite different than `run foo.exe`

If I encode executable instructions in "image.png" and then send them to an interpreter that runs those instructions, the file extension doesn't matter.

jastantonyesterday at 5:34 PM

exactly