
Writing Hello World in Web Assembly (2017) - WA9ACE
https://wa9ace.net/2017/04/20/hello-world-web-assembly.html
======
callahad
Interesting to compare this to the Hello World that's now possible with WASI
and its fd_write function:

[https://github.com/CraneStation/wasmtime/blob/e530a582afe6a2...](https://github.com/CraneStation/wasmtime/blob/e530a582afe6a2b5735fd7cdf5e2e88391e58669/docs/WASI-
tutorial.md#web-assembly-text-example)

~~~
s-macke
Here is the Hello World example for WASI in headerless C using clang. A little
bit more code but also more general.

[https://gist.github.com/s-macke/6dd78c78be46214d418454abb667...](https://gist.github.com/s-macke/6dd78c78be46214d418454abb667a1ba)

~~~
Jare
slen() returns 1 more than it should, or is it meant to include the '\0'?

~~~
s-macke
Yes, you are right. This function should behave as the ordinary strlen
function. Fixed.

------
Willamin
It's always nice to see a blog that doesn't have ads or even a Google tracking
snippet. :)

~~~
Wheaties466
It is, so I sent him some BAT.

~~~
WA9ACE
Thank you, I appreciate it!

~~~
codehalo
Same. Sent you some as well. Nice writeup.

~~~
MuffinFlavored
[https://basicattentiontoken.org/](https://basicattentiontoken.org/) for
anybody else wondering

------
lucasmullens
Seems like Web Assembly is one of those things that's changing so fast that a
2 year old article is probably already outdated. Is this still relevant?

~~~
s-macke
The article describes WebAssembly at a low level and use the assembly language
wast. Therefore, it is still relevant if you want to understand WebAssembly at
this level. The specification has not changed in the last 2 years.

However the tooling around WebAssembly changed a lot. E. g. the compilers
start to fully support the wasm target.

------
ashelmire
Man that is an extremely ugly language. Is this supposed to convince people to
use it? Who’s designing this language?

~~~
minitech
It’s mostly a target for other things to compile to. (The hint is in the
name.)

~~~
anyfoo
I don't think the poster you're replying to was serious, rather they were
trying to make a joke (which I agree does not add anything to the
conversation, however).

