Skip to content

serge-hulne/SwiftlyGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftlyGo

Build beautiful WebAssembly apps in Go, swiftly and declaratively.


🚀 Overview

SwiftlyGo is a minimalist UI framework inspired by SwiftUI, powered by Go and WebAssembly. It provides a declarative way to build interactive web applications using idiomatic Go code.

No HTML, no CSS, no JavaScript. Just Go.


🧩 Features

  • Declarative UI composition
  • 🔁 Reactive state with Observables
  • 🧱 Composable widgets: Label, TextField, Button
  • 🎯 Fluent modifiers: .Padding(), .Background(), .Center()
  • 📦 Single binary output (WASM)
  • 🔄 Hot reload dev server with live-rebuild
  • 🔧 Zero-config startup

📦 Installation

git clone https://github.com/yourname/swiftlygo
cd swiftlygo
go run ./cmd/coredev

Make sure you have Go 1.21+ with WebAssembly support.


✍️ Example

package main

import (
	"fmt"
	"gocore/core"
	"gocore/ui"
)

func OneWay() {
	source := core.NewObservable("")

	in := ui.NewTextField()
	in.BindTo(source)

	out := ui.NewTextField()

	btn := ui.NewButton("Copy")
	btn.OnClick(func() {
		fmt.Println("Clicked:", source.Get())
		out.SetText(source.Get())
	})

	w := ui.NewWindow()
	w.Add(in, out, btn)
	w.Run()
}

🧪 Roadmap

  • Fluent styling modifiers
  • Observables and bindings
  • Derived computed observables
  • Layout containers (e.g., VBox, HBox)
  • Router & navigation
  • Component lifecycle hooks
  • Minimal CSS-in-Go system

👥 Credits

Created by @serge-hulne

Inspired by SwiftUI, Svelte, and the simplicity of Go.


📝 License

GPL-3.0

About

A reactive, declarative, GUI library for developing web apps in pure Go (does not require HTML, CSS or JavaScript)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors