plentico / pico

Svelte-like reactive UI compiler written in Go
2 stars 0 forks source link

Collaborating on creating a Svelte-like compiler in Go #11

Open jimafisk opened 2 years ago

jimafisk commented 2 years ago

Looks like Hugo considered compiling Svelte components at one point: https://github.com/gohugoio/hugo/issues/5894. Not sure how much progress was ultimately made there.

Someone else is trying to do something similar: https://www.upwork.com/jobs/~019bc38bb718cbbc11. Just not sure how to get in contact with Jeff.

Upwork Job description
> We're experimenting with a Svelte-like framework for frontend components but with the tooling/compiler written in Go. We're focusing on a subset of features of Svelte 3. Our POC shows we can use the existing Svelte minimal JS "runtime" in the browser. This means we can use Svelte components as test cases for input/output of this compiler. > > This is fairly straightforward work and using mostly existing lexer/parsers for working with JS/HTML/CSS and an existing simple JS code generation library. The resulting tool will be open source. > > You'll be working with me directly, and I have nearly 15 years of Go experience and even more as an independent software engineer that's been involved in the development of technologies like webhooks and Docker. I'm hoping this project leads to a more long-term collaborative relationship helping execute ideas that will not only be open source, but part of a grander innovation vision in software development tooling. > > You can use the Svelte interactive tutorial to see examples of what this compiler needs to do. The source is the input and the JS output is the output of this compiler: https://svelte.dev/tutorial/dom-events

I've also chatted with @padraicbc and @matthewmueller about this. It would be awesome to get interested folks together to start working in the same direction. Potentially even pull in someone from the Svelte project as an advisor that we can check-in with periodically to make sure we're on track.

Ideally we'd define a spec for the end user experience and work back from there. I've been outlining ideas in this issue queue informally, but it's just been things that come to my head and not very well thought out or organized.

Potential starting points:

jimafisk commented 2 years ago

We had a similar discussion about the compile step in the past: https://github.com/plentico/plenti/issues/47#issuecomment-788158198. Seemed like the folks there were more interested in creating their own svelte-like compiler in Rust, but could be worth following up with them. There's also talk of the core team rewriting Svelte in Rust themselves.

Edit: There is another group actively working on rewriting the Svelte compiler in Rust: https://github.com/pintariching/rustle