Skip to content
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

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

abrown
Copy link
Collaborator

@abrown abrown commented Mar 24, 2020

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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@abrown abrown force-pushed the add-documentation branch 3 times, most recently from 300792b to bd75d70 Compare March 24, 2020 22:20
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]
Copy link
Member

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?

Copy link
Collaborator Author

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.

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
Copy link
Member

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?

Copy link
Collaborator Author

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.
Copy link
Member

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.

Copy link
Collaborator Author

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.

@sbc100
Copy link
Member

sbc100 commented Mar 30, 2020

Great! This looks good to me now. We can remove the mentioning /opt as the default once we update to llvm 11 at which point we can rely instead on https://reviews.llvm.org/D76653.

@sbc100
Copy link
Member

sbc100 commented Apr 1, 2020

@sunfishcode OK to land this?

@sunfishcode
Copy link
Member

Ok!

@sunfishcode sunfishcode merged commit 4d08c33 into WebAssembly:master Apr 3, 2020
@abrown abrown deleted the add-documentation branch April 3, 2020 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants