Closed yznts closed 2 years ago
Its way smaller. I go from 1 MB to 30 KB with it.
The main thing is to get rid of reflection. Many gophers use this: github.com/buger/jsonparser
Example:
https://github.com/genjidb/genji is a golang DB that can run Server side and client side. Its like MongoDB but in golang.
You can compile it using tinygo for clientside ... https://github.com/genjidb/genji.js/blob/master/scripts/buildgo.sh#L27
Seems to be no reasonable solution for this.
Initially main idea was to use kyoto in Cloudflare Workers. But the "price" of the solution and refactor is much higher than the potential profit.
I get your point about the pain
there are other golang template engines that don’t use reflection i think.
the go routines might still work in tinygo. I remember reading sone progress on this in tinygo recently . Can fin link right now.
tinygo
may provide a lot of benefits to the project, like compiling to smallerwasm
payload and using in places where payload size is critical. I also consider as an option usingkyoto
for creating frontend, rendered on the Edge Network (f.e. Cloudflare Workers). Workers have a lot of limitations andtinygo
may satisfy them.