Skip to content

Commit

Permalink
deploy: f8feffa
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Mar 10, 2024
1 parent 9e54f90 commit 3332d19
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 66 deletions.
37 changes: 12 additions & 25 deletions getting-started/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,32 +196,19 @@ <h2><a class="header" href="#linux" id="linux">Linux</a></h2>
<li><a href="#latest-release">Download the latest package release</a> according to your Ubuntu version and CPU architecture.</li>
<li>Follow the official Swift installation guide for Linux from <a href="https://www.swift.org/install/linux/#installation-via-tarball">swift.org</a> while skipping GPG key verification, which is not provided for SwiftWasm releases.</li>
</ol>
<!--- TODO: Update the link and uncomment after releasing 5.9.2
## Experimental: Swift SDK
SwiftWasm provides [Swift SDK](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md)s for WebAssembly. You can use the Swift SDK to cross-compile Swift packages for WebAssembly without installing the whole toolchain.
To use the Swift SDK, you need to install the official Swift toolchain 5.9 or later. Then, you can install the Swift SDK using the following command:
```bash
$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9-SNAPSHOT-2024-03-02-a/swift-wasm-5.9-SNAPSHOT-2024-03-02-a-macos_arm64.artifactbundle.zip
```
After installing the Swift SDK, you can see the installed SDKs using the following command:
```bash
$ swift experimental-sdk list
<SDK name>
<h2><a class="header" href="#experimental-swift-sdk" id="experimental-swift-sdk">Experimental: Swift SDK</a></h2>
<p>SwiftWasm provides <a href="https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md">Swift SDK</a>s for WebAssembly. You can use the Swift SDK to cross-compile Swift packages for WebAssembly without installing the whole toolchain.</p>
<p>To use the Swift SDK, you need to install the official Swift toolchain 5.9 or later. Then, you can install the Swift SDK using the following command:</p>
<pre><code class="language-bash">$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9-SNAPSHOT-2024-03-02-a/swift-wasm-5.9-SNAPSHOT-2024-03-02-a-macos_arm64.artifactbundle.zip
</code></pre>
<p>After installing the Swift SDK, you can see the installed SDKs using the following command:</p>
<pre><code class="language-bash">$ swift experimental-sdk list
&lt;SDK name&gt;
...
```
You can use the installed SDKs to cross-compile Swift packages for WebAssembly using the following command:
```bash
$ swift build --experimental-swift-sdk <SDK name>
```
-->
</code></pre>
<p>You can use the installed SDKs to cross-compile Swift packages for WebAssembly using the following command:</p>
<pre><code class="language-bash">$ swift build --experimental-swift-sdk &lt;SDK name&gt;
</code></pre>
<h2><a class="header" href="#docker" id="docker">Docker</a></h2>
<p>SwiftWasm offical Docker images are hosted on <a href="https://github.com/orgs/swiftwasm/packages/container/package/swift">GitHub Container Registry</a>.</p>
<p>SwiftWasm Dockerfiles are located on <a href="https://github.com/swiftwasm/swiftwasm-docker">swiftwasm-docker</a> repository.</p>
Expand Down
10 changes: 3 additions & 7 deletions getting-started/swift-package.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,9 @@ <h2><a class="header" href="#2-build-the-project-into-a-webassembly-binary" id="
<p>You need to pass <code>--triple</code> option, which indicates that you are building for the target.</p>
<pre><code class="language-sh">$ swift build --triple wasm32-unknown-wasi
</code></pre>
<!--
If [you installed Swift SDK instead of the whole toolchain](./setup.md#experimental-swift-sdk), you need to use the following command:
```sh
$ swift build --experimental-swift-sdk <SDK name>
```
-->
<p>If <a href="./setup.html#experimental-swift-sdk">you installed Swift SDK instead of the whole toolchain</a>, you need to use the following command:</p>
<pre><code class="language-sh">$ swift build --experimental-swift-sdk &lt;SDK name&gt;
</code></pre>
<h2><a class="header" href="#3-run-the-produced-binary" id="3-run-the-produced-binary">3. Run the produced binary</a></h2>
<p>Just as in the <a href="./hello-world.html">previous section</a>, you can run the produced binary with WebAssembly runtimes like <code>wasmtime</code>.</p>
<pre><code class="language-sh">$ wasmtime ./.build/wasm32-unknown-wasi/debug/Example.wasm
Expand Down
47 changes: 15 additions & 32 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,32 +222,19 @@ <h2><a class="header" href="#linux" id="linux">Linux</a></h2>
<li><a href="getting-started/setup.html#latest-release">Download the latest package release</a> according to your Ubuntu version and CPU architecture.</li>
<li>Follow the official Swift installation guide for Linux from <a href="https://www.swift.org/install/linux/#installation-via-tarball">swift.org</a> while skipping GPG key verification, which is not provided for SwiftWasm releases.</li>
</ol>
<!--- TODO: Update the link and uncomment after releasing 5.9.2
## Experimental: Swift SDK
SwiftWasm provides [Swift SDK](https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md)s for WebAssembly. You can use the Swift SDK to cross-compile Swift packages for WebAssembly without installing the whole toolchain.
To use the Swift SDK, you need to install the official Swift toolchain 5.9 or later. Then, you can install the Swift SDK using the following command:
```bash
$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9-SNAPSHOT-2024-03-02-a/swift-wasm-5.9-SNAPSHOT-2024-03-02-a-macos_arm64.artifactbundle.zip
```
After installing the Swift SDK, you can see the installed SDKs using the following command:
```bash
$ swift experimental-sdk list
<SDK name>
<h2><a class="header" href="#experimental-swift-sdk" id="experimental-swift-sdk">Experimental: Swift SDK</a></h2>
<p>SwiftWasm provides <a href="https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md">Swift SDK</a>s for WebAssembly. You can use the Swift SDK to cross-compile Swift packages for WebAssembly without installing the whole toolchain.</p>
<p>To use the Swift SDK, you need to install the official Swift toolchain 5.9 or later. Then, you can install the Swift SDK using the following command:</p>
<pre><code class="language-bash">$ swift experimental-sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-5.9-SNAPSHOT-2024-03-02-a/swift-wasm-5.9-SNAPSHOT-2024-03-02-a-macos_arm64.artifactbundle.zip
</code></pre>
<p>After installing the Swift SDK, you can see the installed SDKs using the following command:</p>
<pre><code class="language-bash">$ swift experimental-sdk list
&lt;SDK name&gt;
...
```
You can use the installed SDKs to cross-compile Swift packages for WebAssembly using the following command:
```bash
$ swift build --experimental-swift-sdk <SDK name>
```
-->
</code></pre>
<p>You can use the installed SDKs to cross-compile Swift packages for WebAssembly using the following command:</p>
<pre><code class="language-bash">$ swift build --experimental-swift-sdk &lt;SDK name&gt;
</code></pre>
<h2><a class="header" href="#docker" id="docker">Docker</a></h2>
<p>SwiftWasm offical Docker images are hosted on <a href="https://github.com/orgs/swiftwasm/packages/container/package/swift">GitHub Container Registry</a>.</p>
<p>SwiftWasm Dockerfiles are located on <a href="https://github.com/swiftwasm/swiftwasm-docker">swiftwasm-docker</a> repository.</p>
Expand Down Expand Up @@ -296,13 +283,9 @@ <h2><a class="header" href="#2-build-the-project-into-a-webassembly-binary" id="
<p>You need to pass <code>--triple</code> option, which indicates that you are building for the target.</p>
<pre><code class="language-sh">$ swift build --triple wasm32-unknown-wasi
</code></pre>
<!--
If [you installed Swift SDK instead of the whole toolchain](./setup.md#experimental-swift-sdk), you need to use the following command:
```sh
$ swift build --experimental-swift-sdk <SDK name>
```
-->
<p>If <a href="getting-started/./setup.html#experimental-swift-sdk">you installed Swift SDK instead of the whole toolchain</a>, you need to use the following command:</p>
<pre><code class="language-sh">$ swift build --experimental-swift-sdk &lt;SDK name&gt;
</code></pre>
<h2><a class="header" href="#3-run-the-produced-binary" id="3-run-the-produced-binary">3. Run the produced binary</a></h2>
<p>Just as in the <a href="getting-started/./hello-world.html">previous section</a>, you can run the produced binary with WebAssembly runtimes like <code>wasmtime</code>.</p>
<pre><code class="language-sh">$ wasmtime ./.build/wasm32-unknown-wasi/debug/Example.wasm
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit 3332d19

Please sign in to comment.