aduros / wasm4

Build retro games using WebAssembly for a fantasy console.
https://wasm4.org
ISC License
1.11k stars 163 forks source link

Crystal support #264

Open tjpalmer opened 2 years ago

tjpalmer commented 2 years ago

This dockerfile builds a 53k do-nothing wasm file using Crystal and wasm-ld and friends, so it might be possible to support Crystal in wasm4.

Here are the todo items in case this works out:

tjpalmer commented 2 years ago

Specifically, here's the final dir listing from the above dockerfile:

total 99192
drwxr-xr-x  5 root root     4096 Dec 17 08:51 binaryen-version_104
-rw-r--r--  1 root root 41526507 Dec 17 08:54 binaryen-version_104-x86_64-linux.tar.gz
drwxr-xr-x 14 root root     4096 Dec 30 15:31 crystal
-rw-r--r--  1 root root   442805 Dec 30 00:46 libpcre-8.45.tar.gz
-rw-r--r--  1 1000 1000   864018 Dec 26 14:39 libpcre.a
-rw-r--r--  1 1000 1000     6896 Dec 26 14:39 libpcreposix.a
-rwxr-xr-x  1 root root    57320 Dec 30 15:52 main-final.wasm
-rw-r--r--  1 root root    53948 Dec 30 15:52 main-opt.wasm
-rw-r--r--  1 root root        0 Dec 30 15:51 main.cr
-rw-r--r--  1 root root   164077 Dec 30 15:52 main.wasm
drwxr-xr-x  5 root root     4096 Nov 19 02:14 wasi-sdk-14.0
-rw-r--r--  1 root root 58424318 Dec  7 03:32 wasi-sdk-14.0-linux.tar.gz
tjpalmer commented 2 years ago

And main-opt.wasm is the actual final product there, made from the empty main.cr. I'll try to find time to actually build something for wasm4, but no promises on a timeline.