Muon is a lightweight alternative to Electron written in Golang in about ~300 LoC, using Ultralight instead of Chromium. Ultralight is a cross-platform WebKit rewrite using the GPU to target embedded desktop applications that resulted in a fast, lightweight, and low-memory HTML UI solution that blends the power of Chromium with the small footprint of Native UI.
Comparison with a "Hello, World!" React App
| Muon | Electron | |
|---|---|---|
| CPU | 0.0% | 1.2% |
| MEM | 26.0 MB | 201.7 MB |
| DISK | 42 MB | 136 MB |
From examples/create-react-app/main.go:
package main
import (
"github.com/ImVexed/muon"
"cra-go/webfiles"
"net/http"
)
func main() {
// Any static asset packer of your liking (ex. fileb0x)
fileHandler := http.FileServer(webfiles.HTTP)
cfg := &muon.Config{
Title: "Hello, World!",
Height: 500,
Width: 500,
Titled: true,
Resizeable: true,
}
m := muon.New(cfg, fileHandler)
// Expose our `add` function to the JS runtime
m.Bind("add", add)
// Show the Window and start the Runtime
if err := m.Start(); err != nil {
panic(err)
}
}
// Muon automatically handles interop to and from the JS runtime
func add(a float64, b float64) float64 {
return a + b
}
Boolean Go: boolNumber Go: float64String Go: stringObject Go: struct via JSON-ldflags -H=windowsgui to either your go build or go run to get rid of the window.exit status 3221225781 libWebCore.so: cannot open shared object file-ldflags "-r ." to your go build to set rpath to the local directory for library resolution.symbol not found: ulCreateSettingsgcc in your path, and ensure you have CGO_ENABLED=1 and GOARCH=386 environment variables set.While muon itself is MIT licensed, Ultralight is not.
Ultralight is free for non-commercial use, educational use,
and also free for commercial use by small indie developers making
less than US$100,000 a year. You can find full terms in the SDK.
Pricing plans for larger commercial projects will be announced later.
Their specific license terms can be found here.
(top 24 of 29)
1,436 followers · starred Jul 2020
345 followers · starred Dec 2022
283 followers · starred Oct 2022
1,455 followers · starred Oct 2019
Muon is a lightweight alternative to Electron written in Golang in about ~300 LoC, using Ultralight instead of Chromium. Ultralight is a cross-platform WebKit rewrite using the GPU to target embedded desktop applications that resulted in a fast, lightweight, and low-memory HTML UI solution that blends the power of Chromium with the small footprint of Native UI.
Comparison with a "Hello, World!" React App
| Muon | Electron | |
|---|---|---|
| CPU | 0.0% | 1.2% |
| MEM | 26.0 MB | 201.7 MB |
| DISK | 42 MB | 136 MB |
From examples/create-react-app/main.go:
package main
import (
"github.com/ImVexed/muon"
"cra-go/webfiles"
"net/http"
)
func main() {
// Any static asset packer of your liking (ex. fileb0x)
fileHandler := http.FileServer(webfiles.HTTP)
cfg := &muon.Config{
Title: "Hello, World!",
Height: 500,
Width: 500,
Titled: true,
Resizeable: true,
}
m := muon.New(cfg, fileHandler)
// Expose our `add` function to the JS runtime
m.Bind("add", add)
// Show the Window and start the Runtime
if err := m.Start(); err != nil {
panic(err)
}
}
// Muon automatically handles interop to and from the JS runtime
func add(a float64, b float64) float64 {
return a + b
}
Boolean Go: boolNumber Go: float64String Go: stringObject Go: struct via JSON-ldflags -H=windowsgui to either your go build or go run to get rid of the window.exit status 3221225781 libWebCore.so: cannot open shared object file-ldflags "-r ." to your go build to set rpath to the local directory for library resolution.symbol not found: ulCreateSettingsgcc in your path, and ensure you have CGO_ENABLED=1 and GOARCH=386 environment variables set.While muon itself is MIT licensed, Ultralight is not.
Ultralight is free for non-commercial use, educational use,
and also free for commercial use by small indie developers making
less than US$100,000 a year. You can find full terms in the SDK.
Pricing plans for larger commercial projects will be announced later.
Their specific license terms can be found here.
(top 24 of 29)
1,436 followers · starred Jul 2020
345 followers · starred Dec 2022
283 followers · starred Oct 2022
1,455 followers · starred Oct 2019