Closed yznts closed 2 years ago
Explore possibility of using tinygo compiler
tinygo has somef limitations:
net/http
is not supportedhtml/template
and text/template
are not supportedSo, using Render
function instead of Template
will be a requirement for using tinygo. Also, all references to html/template
must to be excluded from the library code. As an option, we can use build tag notemplates
to exclude html/template
functionality from build.
kyoto
needs deep restructurization and templates separation to support tinygo, so changes in this direction will be done step-by-step.
Need to provide something like
ImplementsRender
interface. This interface will give rendering control to page/component.Steps to implement:
Template
method in page interfaceTemplate
methodPros:
html/template
usage, developer can choose alternative ways likemaragudk/gomponents
*.go
files will allow to distribute component libraries with Go packages