You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tools/wasme/cli/docs/content/tutorial_code/build_tutorials/building_assemblyscript_filters.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ You'll be asked with an interactive prompt which language platform you are build
27
27
```
28
28
29
29
```
30
-
INFO[0014] extracting 1973 bytes to /Users/ilackarms/go/src/github.com/solo-io/wasme/assemblyscript-filter
30
+
INFO[0014] extracting 1973 bytes to /Users/ilackarms/go/src/github.com/solo-io/wasm/assemblyscript-filter
31
31
```
32
32
33
33
The `init` command will place our *base* filter into the `assemblyscript-filter` directory:
@@ -63,10 +63,10 @@ The new directory contains all files necessary to build and deploy a WASM filter
63
63
64
64
| File | Description |
65
65
| ----- | ---- |
66
-
|`assembly/index.ts`| The source code for the filter, written in AssemblyScript. |
67
-
|`assembly/tsconfig.json`| Typescript config file (AssemblyScript is a subset of Typescript). |
68
-
|`package.json`| Used by to import npm modules during build time. |
69
-
|`package-lock.json`| Locked npm modules. |
66
+
|`assembly/index.ts`| The source code for the filter, written in AssemblyScript. |
67
+
|`assembly/tsconfig.json`| Typescript config file (AssemblyScript is a subset of Typescript). |
68
+
|`package.json`| Used by to import npm modules during build time. |
69
+
|`package-lock.json`| Locked npm modules. |
70
70
|`runtime-config.json`| Config stored with the filter image used to load the filter at runtime. |
71
71
72
72
Open `assembly/index.ts` in your favorite text editor. The source code is AssemblyScript and we'll make some changes to customize our new filter.
@@ -90,7 +90,7 @@ Your method should look like this:
90
90
91
91
## Building the filter
92
92
93
-
Now, let's build a WASM image from our filter with `wasme`. The filter will be tagged and stored in a local registry, similar to how [Docker](https://www.docker.com/) stores images.
93
+
Now, let's build a WASM image from our filter with `wasme`. The filter will be tagged and stored in a local registry, similar to how [Docker](https://www.docker.com/) stores images.
94
94
95
95
Images tagged with `wasme` have the following format:
96
96
@@ -99,7 +99,7 @@ Images tagged with `wasme` have the following format:
99
99
```
100
100
101
101
*`<registry address>` specifies the address of the remote OCI registry where the image will be pushed by the `wasme push` command. The project authors maintain a free public registry at `webassemblyhub.io`.
102
-
102
+
103
103
*`<registry username|org>` either your username for the remote OCI registry, or a valid org name with which you are registered.
`wasme build` runs a build container inside of Docker which may run into issues due to SELinux (on Linux environments). To disable, run `sudo setenforce 0`
118
+
`wasme build` runs a build container inside of Docker which may run into issues due to SELinux (on Linux environments). To disable, run `sudo setenforce 0`
119
119
{{% /notice %}}
120
120
121
-
The module will take up to a few minutes to build. In the background, `wasme` has launched a Docker container to run the necessary
122
-
build steps.
121
+
The module will take up to a few minutes to build. In the background, `wasme` has launched a Docker container to run the necessary
122
+
build steps.
123
123
124
124
When the build has finished, you'll be able to see the image with `wasme list`:
Copy file name to clipboardexpand all lines: tools/wasme/cli/docs/content/tutorial_code/build_tutorials/building_cpp_filters.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Let's create a new filter called `cpp-filter`:
16
16
wasme init cpp-filter
17
17
```
18
18
19
-
You'll be asked with an interactive prompt which language platform you are building for. At time of writing, `wasme` includes separate bases
19
+
You'll be asked with an interactive prompt which language platform you are building for. At time of writing, `wasme` includes separate bases
20
20
for Istio 1.5.x and Gloo 1.3.x:
21
21
22
22
{{< tabs >}}
@@ -39,7 +39,7 @@ You'll be asked with an interactive prompt which language platform you are build
39
39
{{< /tabs >}}
40
40
41
41
```
42
-
INFO[0014] extracting 5072 bytes to /Users/ilackarms/go/src/github.com/solo-io/wasme/cpp-filter
42
+
INFO[0014] extracting 5072 bytes to /Users/ilackarms/go/src/github.com/solo-io/wasm/cpp-filter
43
43
```
44
44
45
45
The `init` command will place our *base* filter into the `cpp-filter` directory:
@@ -85,12 +85,12 @@ The new directory contains all files necessary to build and deploy a WASM filter
85
85
86
86
| File | Description |
87
87
| ----- | ---- |
88
-
|`BUILD`| The Bazel BUILD file used to build the filter. |
89
-
|`WORKSPACE`| The Bazel WORKSPACE file used to build the filter. |
90
-
|`bazel/`| Bazel external dependencies. |
91
-
|`toolchain/`| Bazel tooling for building wasm modules. |
92
-
|`filter.cc`| The source code for the filter, written in C++. |
93
-
|`filter.proto`| The protobuf schema of the filter configuration. |
88
+
|`BUILD`| The Bazel BUILD file used to build the filter. |
89
+
|`WORKSPACE`| The Bazel WORKSPACE file used to build the filter. |
90
+
|`bazel/`| Bazel external dependencies. |
91
+
|`toolchain/`| Bazel tooling for building wasm modules. |
92
+
|`filter.cc`| The source code for the filter, written in C++. |
93
+
|`filter.proto`| The protobuf schema of the filter configuration. |
94
94
|`runtime-config.json`| Config stored with the filter image used to load the filter at runtime. |
95
95
96
96
Open `filter.cc` in your favorite text editor. We'll make some changes to customize our new filter.
@@ -116,7 +116,7 @@ The code above will add the `hello: world!` header to HTTP responses processed b
116
116
117
117
## Building the filter
118
118
119
-
Now, let's build a WASM image from our filter with `wasme`. The filter will be tagged and stored in a local registry, similar to how [Docker](https://www.docker.com/) stores images.
119
+
Now, let's build a WASM image from our filter with `wasme`. The filter will be tagged and stored in a local registry, similar to how [Docker](https://www.docker.com/) stores images.
120
120
121
121
Images tagged with `wasme` have the following format:
122
122
@@ -125,7 +125,7 @@ Images tagged with `wasme` have the following format:
125
125
```
126
126
127
127
* `<registry address>` specifies the address of the remote OCI registry where the image will be pushed by the `wasme push` command. The project authors maintain a free public registry at `webassemblyhub.io`.
128
-
128
+
129
129
* `<registry username|org>` either your username for the remote OCI registry, or a valid org name with which you are registered.
`wasme build` runs a build container inside of Docker which may run into issues due to SELinux (on Linux environments). To disable, run `sudo setenforce 0`
144
+
`wasme build` runs a build container inside of Docker which may run into issues due to SELinux (on Linux environments). To disable, run `sudo setenforce 0`
145
145
{{% /notice %}}
146
146
147
-
The module will take up to a few minutes to build. In the background, `wasme` has launched a Docker container to run the necessary
148
-
build steps.
147
+
The module will take up to a few minutes to build. In the background, `wasme` has launched a Docker container to run the necessary
148
+
build steps.
149
149
150
150
When the build has finished, you'll be able to see the image with `wasme list`:
0 commit comments