diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-06-19 12:06:07 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-06-19 12:06:07 -0400 |
| commit | 673f8325e2116f5645eeada3727b81f6c37982ab (patch) | |
| tree | a98857e5fe531addd8d98aef9776273e0eb45241 | |
| parent | b797446d27d246df7384446215bd3ca37f0f930f (diff) | |
| download | x-673f8325e2116f5645eeada3727b81f6c37982ab.tar.xz x-673f8325e2116f5645eeada3727b81f6c37982ab.zip | |
GopherCon EU 2023 code
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | conferences/gceu23/README.md | 34 | ||||
| -rw-r--r-- | conferences/gceu23/cmd/aiyou/main.go (renamed from wasm/cmd/aiyou/main.go) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/cmd/yuechu/main.go (renamed from wasm/cmd/tensei/main.go) | 2 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/.gitignore (renamed from wasm/wasip1/.gitignore) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/Makefile (renamed from wasm/wasip1/Makefile) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/cat.go (renamed from wasm/wasip1/cat.go) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/echoclient.rs (renamed from wasm/wasip1/echoclient.rs) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/envdump.go (renamed from wasm/wasip1/envdump.go) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/hello.go (renamed from wasm/wasip1/hello.go) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/hello.rs (renamed from wasm/wasip1/hello.rs) | 0 | ||||
| -rw-r--r-- | conferences/gceu23/wasip1/promptreply.rs (renamed from wasm/wasip1/promptreply.rs) | 0 | ||||
| -rwxr-xr-x | conferences/gceu23/wasip1/xesitemd.wasm | bin | 0 -> 5109016 bytes | |||
| -rw-r--r-- | wasm/main.go | 7 |
13 files changed, 35 insertions, 8 deletions
diff --git a/conferences/gceu23/README.md b/conferences/gceu23/README.md new file mode 100644 index 0000000..6f3abb8 --- /dev/null +++ b/conferences/gceu23/README.md @@ -0,0 +1,34 @@ +# Reaching the Unix Philosophy's Logical Conclusion with WebAssembly + +Hey there! This is the example code I wrote for my talk at [GopherCon +EU](https://gophercon.eu). This consists of a few folders with code: + +- `cmd`: Executable commands for the demo. +- `cmd/aiyou`: The WebAssembly runner. It connects to `cmd/yuechu` and + exposes network connections as a filesystem. It is intended to run + `wasip1/echoclient.wasm`. +- `cmd/yuechu`: The echo server that takes lines of inputs from + network connections and feeds them to WebAssembly modules then sends + the output back to the client. It runs `wasip1/promptreply.wasm` and + `wasip1/xesitemd.wasm`. +- `wasip1`: A folder full of small demo programs. Each is built with + makefile commands. +- `wasip1/echoclient.wasm`: A small Rust program that tries to connect + to the echo server, prompts for a line of input, prints what it got + back, and then exits. +- `wasip1/promptreply.wasm`: A small Rust program that reads input + from standard in and then writes it to standard out. +- `wasip1/xesitemd.wasm`: My [blog's](https://xeiaso.net) markdown to + HTML parser. It reads xesite-flavored markdown over standard input + and returns HTML over standard output. + +In order to build and run the code in this folder, you must be using +Nix and be inside a `nix develop` shell. You can build most files in +`wasip1` by using `make` such as like this: + +``` +make echoreply.wasm promptreply.wasm +``` + +If you have any questions, please [email +me](https://xeiaso.net/contact) or open an issue on this repo. diff --git a/wasm/cmd/aiyou/main.go b/conferences/gceu23/cmd/aiyou/main.go index ff60cca..ff60cca 100644 --- a/wasm/cmd/aiyou/main.go +++ b/conferences/gceu23/cmd/aiyou/main.go diff --git a/wasm/cmd/tensei/main.go b/conferences/gceu23/cmd/yuechu/main.go index 987ff48..f0fa94f 100644 --- a/wasm/cmd/tensei/main.go +++ b/conferences/gceu23/cmd/yuechu/main.go @@ -29,7 +29,7 @@ var ( func main() { internal.HandleStartup() - ctx := opname.With(context.Background(), "tensei") + ctx := opname.With(context.Background(), "yuechu") data, err := os.ReadFile(*binary) if err != nil { diff --git a/wasm/wasip1/.gitignore b/conferences/gceu23/wasip1/.gitignore index 19e1bce..19e1bce 100644 --- a/wasm/wasip1/.gitignore +++ b/conferences/gceu23/wasip1/.gitignore diff --git a/wasm/wasip1/Makefile b/conferences/gceu23/wasip1/Makefile index eed2dbd..eed2dbd 100644 --- a/wasm/wasip1/Makefile +++ b/conferences/gceu23/wasip1/Makefile diff --git a/wasm/wasip1/cat.go b/conferences/gceu23/wasip1/cat.go index 7033dbd..7033dbd 100644 --- a/wasm/wasip1/cat.go +++ b/conferences/gceu23/wasip1/cat.go diff --git a/wasm/wasip1/echoclient.rs b/conferences/gceu23/wasip1/echoclient.rs index 4049203..4049203 100644 --- a/wasm/wasip1/echoclient.rs +++ b/conferences/gceu23/wasip1/echoclient.rs diff --git a/wasm/wasip1/envdump.go b/conferences/gceu23/wasip1/envdump.go index 6f940c4..6f940c4 100644 --- a/wasm/wasip1/envdump.go +++ b/conferences/gceu23/wasip1/envdump.go diff --git a/wasm/wasip1/hello.go b/conferences/gceu23/wasip1/hello.go index 78a7f8f..78a7f8f 100644 --- a/wasm/wasip1/hello.go +++ b/conferences/gceu23/wasip1/hello.go diff --git a/wasm/wasip1/hello.rs b/conferences/gceu23/wasip1/hello.rs index b4998a8..b4998a8 100644 --- a/wasm/wasip1/hello.rs +++ b/conferences/gceu23/wasip1/hello.rs diff --git a/wasm/wasip1/promptreply.rs b/conferences/gceu23/wasip1/promptreply.rs index 09d29db..09d29db 100644 --- a/wasm/wasip1/promptreply.rs +++ b/conferences/gceu23/wasip1/promptreply.rs diff --git a/conferences/gceu23/wasip1/xesitemd.wasm b/conferences/gceu23/wasip1/xesitemd.wasm Binary files differnew file mode 100755 index 0000000..99eab0f --- /dev/null +++ b/conferences/gceu23/wasip1/xesitemd.wasm diff --git a/wasm/main.go b/wasm/main.go deleted file mode 100644 index 7eab755..0000000 --- a/wasm/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("testing a wasm module from buildGoWasiModule") -} |
