Update WASI-tutorial.md
Update README based on feedback
This commit is contained in:
committed by
Dan Gohman
parent
15b85dc285
commit
3425553dc6
@@ -73,14 +73,20 @@ int main(int argc, char **argv) {
|
||||
We'll put this source in a file called `demo.c`.
|
||||
|
||||
The [wasi-sdk](https://github.com/CraneStation/wasi-sdk/releases) provides a clang
|
||||
which is configured to target WASI and use the WASI sysroot by default, so we can
|
||||
which is configured to target WASI and use the WASI sysroot by default if you put the extracted tree into `/`, so we can
|
||||
compile our program like so:
|
||||
|
||||
```
|
||||
$ clang demo.c -o demo.wasm
|
||||
```
|
||||
|
||||
If you would want to extract it elsewhere, you can specify the directory like so
|
||||
|
||||
```
|
||||
$ clang demo.c --sysroot <path to sysroot> -o demo.wasm
|
||||
```
|
||||
|
||||
The sysroot is folder is located in `opt/wasi-sdk/share/sysroot/`.
|
||||
If you're using the wasi-sdk, the sysroot folder is located in `opt/wasi-sdk/share/sysroot/` on Linux and mac.
|
||||
|
||||
A few things to note here. First, this is just regular clang, configured to use
|
||||
a WebAssembly target and sysroot. Second, the output name specified with the "-o"
|
||||
|
||||
Reference in New Issue
Block a user