Open HarikrishnanBalagopal opened 1 year ago
This is really cool! I'm curious what the performance overhead is of compiling the interpreter from Go to wasm. Have you tried running any of the benchmarks in the starlark-go tree? (If Go's testing
package is a challenge for wasm you could just run go test
and observe how many iterations of each benchmark get run and then just rewrite the benchmarks as simple loops of a fixed count and see how long they take.
I imagine JavaScript programs would also want a slightly different API to the interpreter. Have you tried passing JavaScript values (and especially functions) in and out of Starlark programs?
Nice! I made something similar too:
Feature Request
Overview
This library compiles nicely to WASM with just a small wrapper. It can be used to show a demo and/or for using this library in languages other than Golang. I have a working demo here https://haribala.dev/starlark-webasm-demo/ The code is here https://github.com/HarikrishnanBalagopal/starlark-webasm and here https://github.com/HarikrishnanBalagopal/starlark-webasm-demo