Skip to content

Commit f93828d

Browse files
committed
Revert "docs: update about wasi-sysroot"
This reverts commit da939e3. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent 3d0a117 commit f93828d

2 files changed

Lines changed: 27 additions & 11 deletions

File tree

docs/Devcontainers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 -->
77

88
Devcontainers are tools that allows you to create and manage isolated development environments in containers. It provides a consistent and reproducible development environment across different machines and operating systems.
99

10-
It is the fastest and easiest way to develop Ocre in Linux, macOS, and Windows. As it already comes preinstalled with all the necessary tools for building Ocre and the samples, including wasi-sysroot.
10+
It is the fastest and easiest way to develop Ocre in Linux, macOS, and Windows. As it already comes preinstalled with all the necessary tools for building Ocre and the samples, including wasi-sdk.
1111

1212
More information can be found at [the official Devcontainers documentation](https://containers.dev/).
1313

docs/NativeBuild.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,42 @@ Our reference system is a Ubuntu 24.04 LTS, however these instructions can be ea
2020
### Build Tools
2121

2222
Ocre requires CMake and a C compiler such as GCC. For full testing support, we also use clang.
23-
If we are checking out the Ocre repository, we also need Git to clone Ocre Runtime, and Wget to unpack wasi-sysroot. Install all with:
23+
If we are checking out the Ocre repository, we also need Git to clone Ocre Runtime, and Wget to unpack the WASI-SDK. Install all with:
2424

2525
```sh
2626
sudo apt update -y
27-
sudo apt install -y apt install build-essential git cmake clang wget libclang-rt-dev-wasm32 lld
27+
sudo apt install -y apt install build-essential git cmake clang wget
2828
```
2929

30-
### WASI Sysroot
30+
### WASI-SDK
3131

32-
For building WASM/WASI containers (including the test containers), we need the WASI Sysroot.
33-
Download wasi-sysroot from [the WASI SDK releases page](https://github.com/WebAssembly/wasi-sdk/releases) for your platform. The current recommended version is `wasi-sysroot-29`.
32+
For building WASM/WASI containers (including the test containers), we need the WASI-SDK.
33+
Download a WASI-P1 compatible WASI-SDK from [the WASI SDK releases page](https://github.com/WebAssembly/wasi-sdk/releases) for your platform. The current recommended version is `wasi-sdk-29`.
3434

35-
This is usually installed under `/opt/wasi-sysroot` for default easy usage without the need to set environment variables.
35+
This is usually installed under `/opt/wasi-sdk` for default easy usage without the need to set environment variables.
3636

37-
Download, unpack and install wasi-sysroot:
37+
Download, unpack and install WASI SDK. Note that these are Linux binary packages. Make sure you replace `amd_64` with `arm64` in case your host is ARM64 based:
3838

3939
```sh
40-
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-29/wasi-sysroot-29.0.tar.gz
41-
tar -xzf wasi-sysroot-29.0.tar.gz
42-
sudo mv wasi-sysroot-29.0 /opt/wasi-sysroot
40+
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-29/wasi-sdk-29.0-amd_64-linux.tar.gz
41+
tar -xzf wasi-sdk-29.0-amd_64-linux.tar.gz
42+
sudo mv wasi-sdk-29.0-amd_64-linux /opt/wasi-sdk
43+
```
44+
45+
You can check that WASI SDK is properly installed by checking the WASI clang version:
46+
47+
```sh
48+
/opt/wasi-sdk/bin/clang --version
49+
```
50+
51+
The output should be similar to:
52+
53+
```
54+
clang version 21.1.4-wasi-sdk (https://github.com/llvm/llvm-project 222fc11f2b8f25f6a0f4976272ef1bb7bf49521d)
55+
Target: wasm32-unknown-wasi
56+
Thread model: posix
57+
InstalledDir: /opt/wasi-sdk/bin
58+
Configuration file: /opt/wasi-sdk/bin/clang.cfg
4359
```
4460

4561
## Linux

0 commit comments

Comments
 (0)