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
-[TinyGo](https://tinygo.org/) - This SDK depends on TinyGo and leverages its [WASI](https://github.com/WebAssembly/WASI) (WebAssembly System Interface) target. Please follow the official instruction [here](https://tinygo.org/getting-started/) for installing TinyGo.
16
+
-[Envoy](https://www.envoyproxy.io) - To run compiled examples, you need to have Envoy binary. Please follow [the official instruction](https://www.envoyproxy.io/docs/envoy/latest/start/install).
56
17
57
-
## Development
18
+
## Build and run Examples
58
19
59
20
```bash
60
21
# Build all examples.
@@ -64,48 +25,28 @@ make build.examples
64
25
make build.example name=helloworld
65
26
66
27
# Run a specific example.
67
-
# This requires you to have Envoy binary locally.
68
28
make run name=helloworld
29
+
```
69
30
70
-
# Run local tests without running envoy processes.
71
-
make test
31
+
## Compatible Envoy builds (tested on CI)
72
32
73
-
# Run all e2e tests.
74
-
# This requires you to have Envoy binary locally.
75
-
make test.e2e
33
+
Envoy is the first host side implementation of Proxy-Wasm ABI,
34
+
and we run end-to-end tests with multiple Envoy versions in order to verify Proxy-Wasm Go SDK works as expected.
- TinyGo allows us to disable GC, but we cannot do that since we need to use maps (implicitly causes allocation)
94
-
for saving the plugin's [state](https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/cf6ad74ed58b284d3d8ceeb8c5dba2280d5b1007/proxywasm/vmstate.go#L41-L46).
95
-
- Theoretically, we can implement our own GC algorithms tailored for proxy-wasm through `alloc(uintptr)`[interface](https://github.com/tinygo-org/tinygo/blob/v0.14.1/src/runtime/gc_none.go#L13)
96
-
with `-gc=none` option. This is the future TODO.
97
-
-`recover` is [not implemented](https://github.com/tinygo-org/tinygo/issues/891) in TinyGo, and there's no way to prevent the Wasm virtual machine from aborting.
98
-
- Goroutine support
99
-
- In TinyGo, Goroutine is implmeneted through LLVM's coroutine (see [this blog post](https://aykevl.nl/2019/02/tinygo-goroutines)).
100
-
- In Envoy, Wasm modules are run in the event driven manner, and therefore the "scheduler" is not executed once the main function exits.
101
-
That means you cannot have the expected behavior of Goroutine as in ordinary host environments.
102
-
- The question "How to deal with Goroutine in a thread local Wasm VM executed in the event drive manner" has yet to be answered.
103
-
- We strongly recommend that you implement the `OnTick` function for any asynchronous task instead of using Goroutine.
104
-
- The scheduler can be disabled with `-scheduler=none` option of TinyGo.
105
-
106
-
## References
45
+
## External links
107
46
108
47
-[WebAssembly for Proxies (ABI specification)](https://github.com/proxy-wasm/spec)
48
+
-[WebAssembly for Proxies (AssemblyScript SDK)](https://github.com/solo-io/proxy-runtime)
109
49
-[WebAssembly for Proxies (C++ SDK)](https://github.com/proxy-wasm/proxy-wasm-cpp-sdk)
110
50
-[WebAssembly for Proxies (Rust SDK)](https://github.com/proxy-wasm/proxy-wasm-rust-sdk)
51
+
-[WebAssembly for Proxies (Zig SDK)](https://github.com/mathetake/proxy-wasm-zig-sdk)
111
52
-[TinyGo - Go compiler for small places](https://tinygo.org/)
We welcome contributions from the community. Please read the following guidelines carefully to maximize the chances of your PR being merged.
4
+
5
+
## Coding Style
6
+
7
+
The code is linted using a stringent golang-ci. To run this linter (and a few others) use run `make check`. To format your files, you can run `make format`.
8
+
9
+
## Running tests
10
+
11
+
```
12
+
# Run local tests without running envoy processes.
13
+
make test
14
+
15
+
# Run all e2e tests.
16
+
# This requires you to have Envoy binary locally.
17
+
make test.e2e
18
+
19
+
# Run e2e tests for a specific example.
20
+
# This requires you to have Envoy binary locally.
21
+
make test.e2e.single name=helloworld
22
+
```
23
+
24
+
## Code Reviews
25
+
26
+
* Indicate the priority of each comment, following this
0 commit comments