3 ms·
And what's the public API/stdlib/bindings inside the WASM workers? I've been thinking a lot about this today and I think you might have a hidden gem here. Wher
by kaoD 5mo ago
And what's the public API/stdlib/bindings inside the WASM workers?
I've been thinking a lot about this today and I think you might have a hidden gem here. Where can I reach you to talk more about this?
Feel free to drop an email (address in my profile)
- sambigeara 5mo agoHa, thanks! I'll ping you an email. > And what's the public API/stdlib/bindings inside the WASM workers? Wazero (via Extism) carries the load here. As it stands, the runtime lifts three basic host functions into guest code which enable the RPC-like behaviour, injection of caller-context and basic logging[1], which are in turn referenced in the guest code like in the example[2]. In the reverse direction, guest code exposes it's public APIs via build directives[3], which are handled by the runtime code[4]. Figured that concrete examples might be more helpful here (I hope the formatting works). [1] https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd10a8bf35bb80f39d930775/pkg/wasm/hostfuncs.go#L53 https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd... [2] https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd10a8bf35bb80f39d930775/examples/echo/main.go#L19-L20 https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd... [3] https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd10a8bf35bb80f39d930775/examples/echo/main.go#L28-L29 https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd... [4] https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd10a8bf35bb80f39d930775/pkg/wasm/runtime.go#L164 https://github.com/Sambigeara/pollen/blob/567e85d5f1407932dd...