valyala / quicktemplate

Fast, powerful, yet easy to use template engine for Go. Optimized for speed, zero memory allocations in hot paths. Up to 20x faster than html/template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile to wasm when template changes

gedw99 opened this issue · comments

commented

here is an idea .

You could install tinygo along side you binary and then compile the template and then run it with Wazero.

Template change detection can use file piling, just like go-task uses. So works reliably on all OS’s.

Wazero can be imported into you main binary and run with it.

now you can ship your wasm quick templates out to your servers , mobile or desktop apps. You can do it at runtime or compile time.
Shipping them out can use S3 store with a SSE or GRPC notification.

also you could use this for web browsers with the wasm running in the browser also .