this post was submitted on 29 Nov 2023
5 points (85.7% liked)
JavaScript
1975 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You could do it pretty easily in Go.
Basically just use embedfs to add your javascript and HTML.
https://pkg.go.dev/embed
Here's a complete working example with a http server from that page:
I see you want a screen saver and this just runs an app to view in your browser. There are other methods but they are a bit trickier. It's not too hard to add an embedded interpreter but you'd probably have to do some porting to get it drawing to a native canvas.