English | 简体中文
A cross-platform native UI engine with a Go backend: app logic, the reactive graph and layout run in Go, and each platform draws with its own native UI.
It follows the design of Native Shell (NSH), for teams that want NSH's model without writing Rust.
NSGo is early, with no release or stable API yet. It runs on macOS, iOS and its App Clips, tvOS, watchOS, Windows, Linux, the web, Android, and experimentally in WeChat, QQ, Alipay and Douyin mini programs, which hold an app to 2 MB, and apps embed in iOS, Android and Go desktop apps of their own; ARCHITECTURE.md tracks each target.
With Go 1.27.3 or later, and Xcode for iOS, tvOS and watchOS, create an app and run it with hot reload:
go mod init example.com/hello
go get github.com/nsgo-dev/nsgo
go get -tool github.com/nsgo-dev/nsgo/cmd/nsgo
go tool nsgo init # -template tsx for a TSX app
go tool nsgo dev # -target web, ios_simulator, tvos_simulator, watchos_simulator, android or miniprogram_wechat to run elsewhereAn app is Go components that return elements, with signals updating what reads them:
func Root(cx *core.Scope) core.Node {
count := core.NewSignal(cx, 0)
return core.View{Style: core.Style{Padding: core.All(24), Gap: 12}, Children: []core.Node{
core.Text{ContentFunc: func() string { return fmt.Sprintf("Pressed %d times", count.Get()) }},
base.Button{
OnPress: func(core.PressEvent) { count.Update(func(n int) int { return n + 1 }) },
Children: []core.Node{core.Text{Content: "Press me"}},
},
}}
}
func main() { nsgo.Run(Root) }The docs cover components and state, layout, styles, navigation, a component reference, TSX apps, localization, testing, embedding, building and shipping; the live demo runs the gallery in the browser.
Coding agents learn NSGo from its skill, bunx skills add nsgo-dev/nsgo, and read the docs as Markdown from llms.txt.
go tool nsgo dev examples/gallery # run the gallery
go tool nsgo check # vet every package
go tool nsgo test # every package's testsContributing has the rest of the setup. Read ARCHITECTURE.md and AGENTS.md before changing code, and CHANGELOG.md for what changed.
Questions, ideas and what you build with NSGo are welcome in nsgo-dev-community, the Telegram group @nsgo_dev. Report bugs and propose changes in issues.
Licensed under the Apache License, Version 2.0. NSGo is a port of NSH, and NOTICE records the attribution that port owes.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in NSGo by you, as defined in the Apache-2.0 license, shall be licensed under Apache-2.0, without any additional terms or conditions.
