4 ms·
I used this to run ML models I compiled down to WASM from Go. Really useful to put generic, high performance HTTP / JSON handling in front of some common interc
by nmhancoc 3y ago
I used this to run ML models I compiled down to WASM from Go. Really useful to put generic, high performance HTTP / JSON handling in front of some common interchangeable code.
- szopa 3y agoThis sounds very interesting. Can you please elaborate?
- nmhancoc 3y agoI start out with a trained ML model, transform it into equivalent C code, then compile that C code targeting WASM. Then I have a HTTP server in Go, which loads the wasm module on startup, just like dlopen but with a small ~10% performance overhead, rips the HTTP payload out, and calls the WASM function with the arguments filled in.