yznts / kyoto

Asynchronous frontends with Go
https://pkg.go.dev/github.com/yznts/kyoto/v3
MIT License
651 stars 28 forks source link

Eliminate obligatory using of `html/template` and give control to user #42

Closed yznts closed 2 years ago

yznts commented 3 years ago

Need to provide something like ImplementsRender interface. This interface will give rendering control to page/component.
Steps to implement:

Pros:

yznts commented 2 years ago

Explore possibility of using tinygo compiler

yznts commented 2 years ago

tinygo has somef limitations:

So, 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.