Skip to content

Commit afea37a

Browse files
committed
Updated setup section in the tutorial
1 parent a978e1e commit afea37a

10 files changed

+15
-100
lines changed

docs/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ authors = ["Bailey Hayes", "Peter Vetere", "Kyle Brown"]
33
language = "en"
44
multilingual = false
55
src = "src"
6-
title = "SingleStore Wasm Toolkit"
6+
title = "SingleStore Wasm Tutorial"
77

88
[output.html]
99

docs/src/SUMMARY.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
- [Overview](Tutorial-Overview.md)
44
- [Setup](Tutorial-Setup.md)
5-
- [With a Development Container](Tutorial-Setup-Container.md)
6-
- [VS Code Container](Tutorial-Setup-Container-VSCode.md)
7-
- [Standalone Container](Tutorial-Setup-Container-Standalone.md)
8-
- [Locally](Tutorial-Setup-Local.md)
95
- [Examples](Tutorial-Examples.md)
106
- [Writing WIT IDL](Tutorial-WIT.md)
117
- [WIT for the `power-of` Example](Tutorial-WIT-Power.md)

docs/src/Tutorial-Deploy-Power.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- GENERATED FILE; DO NOT CHANGE! -->
22

33
# Deploying the `power-of` Example
4-
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. The easiest is probably to use the `pushwasm` tool, included in the `wasm-toolkit` development containers. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
4+
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. One way is to use the `pushwasm` tool, provided in the development container. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
55

66
Before we start, ensure that a destination database is available. To do this, using your favorite SQL client, create a new database called `wasm_tutorial`. For example, you might use the following statements:
77

docs/src/Tutorial-Deploy-Prologue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. The easiest is probably to use the `pushwasm` tool, included in the `wasm-toolkit` development containers. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
1+
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. One way is to use the `pushwasm` tool, provided in the development container. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
22

33
Before we start, ensure that a destination database is available. To do this, using your favorite SQL client, create a new database called `wasm_tutorial`. For example, you might use the following statements:
44

docs/src/Tutorial-Deploy-Split.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- GENERATED FILE; DO NOT CHANGE! -->
22

33
# Deploying the `split-str` Example
4-
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. The easiest is probably to use the `pushwasm` tool, included in the `wasm-toolkit` development containers. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
4+
Now that you've compiled and tested your Wasm function, it is ready for deployment into the database. This can be done in multiple ways. One way is to use the `pushwasm` tool, provided in the development container. Alternatively, you can "pull" the Wasm module into the database by first uploading it to cloud storage (SingleStoreDB supports pulling Wasm modules from multiple cloud providers -- GCS, Azure, and S3). We'll discuss both techniques.
55

66
Before we start, ensure that a destination database is available. To do this, using your favorite SQL client, create a new database called `wasm_tutorial`. For example, you might use the following statements:
77

docs/src/Tutorial-Setup-Container-Standalone.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/src/Tutorial-Setup-Container-VSCode.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/src/Tutorial-Setup-Container.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/src/Tutorial-Setup-Local.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/src/Tutorial-Setup.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
For each example in this tutorial, it will be useful to create yourself a separate work directory in which to put your code and compiled artifacts. This will help keep your files for each example organized.
44

5-
In addition to a SQL client and SingleStore database, youll need a few other things to get your environment set up properly. For this, you have some options:
5+
In addition to a SQL client and SingleStore database, you'll need Docker or some other container runtime. SingleStore's recommended workflow uses a special development container to ensure that you have all the dependencies needed to build a Wasm UDF or UDAF. To help with this, we've created a handy [wrapper script](https://github.com/singlestore-labs/singlestore-wasm-toolkit/blob/main/scripts/dev-shell) that will start the shell. You can download the script directly [here](https://raw.githubusercontent.com/singlestore-labs/singlestore-wasm-toolkit/refs/heads/main/scripts/dev-shell).
66

7-
- Use a [development container](Tutorial-Setup-Container.md) (recommended)
8-
- Install development dependencies [locally](Tutorial-Setup-Local.md)
7+
Once you've downloaded the script, ensure that it has executable permissions and is in your `PATH`. Then, open a command prompt and run the following command. The argument is the path to the intended root of your Wasm module's source code (it must exist first). For example: `dev-shell /home/$USER/src/my-wasm-project`.
8+
9+
When the shell starts, you should see the following prompt:
10+
```
11+
[dev-shell]:~/src %
12+
```
13+
14+
The `src` directory will have been mounted from path you passed to the `dev-shell` script. It is *not* necessary to write the code for this tutorial inside the container's shell; you may use your preferred editing workflow for this. However, please *do* be sure to run all suggested build and deployment commands inside the container's shell so that you have access to the necessary tools.
15+
16+
Next, let's pick an [example](Tutorial-Examples.md) to work through.
917

0 commit comments

Comments
 (0)