Vue-inspired library with Go+WebAssembly

388 views
Skip to first unread message

Brad

unread,
Mar 29, 2019, 12:39:42 AM3/29/19
to golang-nuts
Now that WebAssembly is available as an (experimental) compilation target, it raises the question of how feasible is it to make a quality UI library. Vue (my personal fav) and React, while they have their issues, do have many ideas which are good and seem like they may translate well over to WebAssembly.

Here's a working experimental Vue-like UI library with tools to write UI components in .vugu files (similar in concept to .vue files): https://github.com/vugu/vugu; Getting Started page: http://www.vugu.org/doc/start

HTML with logic in it gets code generated to .go files.  In-browser rendering in wasm  with DOM sync as well as static HTML output are implemented.

And this is my cheesy bullet-pointed list that makes it sound a lot more mature than it is:

* Runs in-browser using WebAssembly
* Single-file components
* Vue-like markup syntax
* Write idiomatic Go code
* Rapid prototyping
* ~3 minute setup
* Standard Go build tools

I'm curious what people think of the approach and ideas for improvement.

--brad

Rusco

unread,
Mar 29, 2019, 6:04:19 AM3/29/19
to golang-nuts
Congrats, I am sure a lot of gophers waited for something like this !
I especially like this comment:  "No node. No JS. No npm. No node_modules folder competing with your music library for disk space" 
😂

Mike Schinkel

unread,
Mar 30, 2019, 12:12:31 AM3/30/19
to golang-nuts
Oops. I think I spoke to soon. I don't think what you have is an alternative to Lorca, but an alternative to Vue.js (which might still be interesting.)

Whoever is moderating if you see this in time please just delete both messages.

Mike Schinkel

unread,
Mar 30, 2019, 12:12:31 AM3/30/19
to golang-nuts
Hi Brad,

This sounds very interesting. 

We are currently building a product using Lorca (https://github.com/zserge/lorca) but am worried that it is not mature and may never be, and that Chrome could change and disable to features that make it possible at any time.

What are your plans for it?  I would be really interested if it could become a commercial product so that I could have better confidence of it being supported.

-Mike


On Friday, March 29, 2019 at 12:39:42 AM UTC-4, Brad wrote:

Brad

unread,
Mar 30, 2019, 12:16:09 AM3/30/19
to golang-nuts
Yeah, it's different.  But it would certainly be cool to have a solution that provides an Electron-like shell around a Vugu application.  I'll make an issue for it so it's noted for later.

Mike Schinkel

unread,
Mar 30, 2019, 1:40:15 PM3/30/19
to Brad, golang-nuts
But it would certainly be cool to have a solution that provides an Electron-like shell around a Vugu application.  I'll make an issue for it so it's noted for later.

Yes! Exactly.  Would be very interested in that.


--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/kpMrXLZ38So/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages