-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add beginner-level documentation for installation and use #107
Conversation
8cf4a41
to
4a31348
Compare
300792b
to
bd75d70
Compare
README.md
Outdated
```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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
README.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, looks I used an URL from somewhere; the new ones work too. I'll update.
README.md
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.