https://github.com/corani/go-wasm-faas
Go server that runs WASM functions
https://github.com/corani/go-wasm-faas
Last synced: 4 months ago
JSON representation
Go server that runs WASM functions
- Host: GitHub
- URL: https://github.com/corani/go-wasm-faas
- Owner: corani
- Created: 2023-06-25T06:55:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T11:38:20.000Z (almost 2 years ago)
- Last Synced: 2025-01-09T20:48:25.084Z (5 months ago)
- Language: Go
- Size: 604 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go WASM FaaS
Toy project to create a FaaS service in Go that allows creating functions as WASM modules.
This is based on the excellent article [FAAS in Go with WASM, WASI and Rust](https://eli.thegreenplace.net/2023/faas-in-go-with-wasm-wasi-and-rust/) by Eli Bendersky.
## Running
Use `./build.sh` to build the server and the example WASM modules (note that the WASM module requires Go 1.21 or later!)
Run the server using `./bin/server`.
To register the example function, navigate to http://localhost:8080/ and enter:
- Name: `add`
- File: upload `target/add.wasm`To execute the function, navigate to http://localhost:8080/run/add?a=34&b=35