Add beginner-level documentation for installation and use#107
Conversation
8cf4a41 to
4a31348
Compare
300792b to
bd75d70
Compare
| ```shell script | ||
| wget https://github.com/CraneStation/wasi-sdk/releases/download/wasi-sdk-[VERSION]/wasi-sdk-[VERSION]-linux.tar.gz | ||
| tar xvf wasi-sdk-[VERSION]-linux.tar.gz | ||
| cp -r wasi-sdk-[VERSION] [WASI_SDK_PATH] |
There was a problem hiding this comment.
I think I'm ok with this as is, but I wouldn't even include the cp command at all. Mostly because when I use the SDK I just untar it... I don't then copy it. This seems to imply that copying it is necessary.
I don't mean to be pedantic... do you think it helps to include a copy here?
There was a problem hiding this comment.
I don't care either way: I originally included it because I have been doing the copy to /opt/wasi-sdk... I removed it in the latest push.
bd75d70 to
e9560af
Compare
|
|
||
| A typical installation from the release binaries might look like the following: | ||
| ```shell script | ||
| wget https://github.com/CraneStation/wasi-sdk/releases/download/wasi-sdk-[VERSION]/wasi-sdk-[VERSION]-linux.tar.gz |
There was a problem hiding this comment.
Do you know what we need to do to update this URL to point to the WebAssembly org now, rather than CraneStation?
There was a problem hiding this comment.
Huh, looks I used an URL from somewhere; the new ones work too. I'll update.
| CC="[WASI_SDK_PATH]/bin/clang --sysroot=[WASI_SDK_PATH]/share/wasi-sysroot" | ||
| $CC foo.c -o foo.wasm | ||
| ``` | ||
| Note: `[WASK_SDK_PATH]/share/wasi-sysroot` contains the WASI-specific includes/libraries/etc. |
There was a problem hiding this comment.
The one thing I'd add here is that the clang comes preconfigured, I think to look for the sysroot under /opt/wasi-sdk, so if you install the packages there then you don't need to pass --sysroot.
There was a problem hiding this comment.
Ha! I think @sbc100 was commenting about this above... but in the opposite direction (i.e. more explicit use of --sysroot). I'll add a note here about /opt/wasi-sdk.
e9560af to
cee6128
Compare
|
Great! This looks good to me now. We can remove the mentioning |
|
@sunfishcode OK to land this? |
|
Ok! |
This may seem very obvious to users of this repo but I couldn't quite recall the steps to install the latest version of wasi-sdk from the release binaries.