diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-04 11:55:34 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-04 11:55:34 +0200 |
| commit | 2a8e7aeeef99161b6f0378ac14e297c23ca6227b (patch) | |
| tree | d3ab195eabf4d06cad8b305756e14d4b138eae63 /00_hello_world | |
| download | emscripten-tutorial-2a8e7aeeef99161b6f0378ac14e297c23ca6227b.tar.gz emscripten-tutorial-2a8e7aeeef99161b6f0378ac14e297c23ca6227b.zip | |
First 4 examples
Diffstat (limited to '00_hello_world')
| -rwxr-xr-x | 00_hello_world/build.sh | 4 | ||||
| -rw-r--r-- | 00_hello_world/hello.c | 5 | ||||
| -rwxr-xr-x | 00_hello_world/run-node.sh | 3 | ||||
| -rwxr-xr-x | 00_hello_world/run-server.sh | 3 |
4 files changed, 15 insertions, 0 deletions
diff --git a/00_hello_world/build.sh b/00_hello_world/build.sh new file mode 100755 index 0000000..9b6b576 --- /dev/null +++ b/00_hello_world/build.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | mkdir -p build | ||
| 4 | emcc -o build/index.html hello.c | ||
diff --git a/00_hello_world/hello.c b/00_hello_world/hello.c new file mode 100644 index 0000000..66e36aa --- /dev/null +++ b/00_hello_world/hello.c | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #include <stdio.h> | ||
| 2 | |||
| 3 | int main() { | ||
| 4 | printf("Hello, web!\n"); | ||
| 5 | } | ||
diff --git a/00_hello_world/run-node.sh b/00_hello_world/run-node.sh new file mode 100755 index 0000000..3fdf61e --- /dev/null +++ b/00_hello_world/run-node.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | node build/index.js | ||
diff --git a/00_hello_world/run-server.sh b/00_hello_world/run-server.sh new file mode 100755 index 0000000..c0087d4 --- /dev/null +++ b/00_hello_world/run-server.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | darkhttpd build | ||
