Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jimafisk opened this issue Jan 29, 2022 · 1 comment
Open

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

jimafisk opened this issue Jan 29, 2022 · 1 comment

Comments

@jimafisk
Copy link
Member

Looks like Hugo considered compiling Svelte components at one point: gohugoio/hugo#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
Copy link
Member Author

jimafisk commented Jan 29, 2022

We had a similar discussion about the compile step in the past: plentico/plenti#47 (comment). 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant