RWKV-Runner/main.go

40 lines
687 B
Go
Raw Normal View History

2023-05-03 15:38:54 +00:00
package main
import (
"embed"
2023-05-05 15:23:34 +00:00
backend "rwkv-runner/backend-golang"
2023-05-03 15:38:54 +00:00
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the app structure
2023-05-05 15:23:34 +00:00
app := backend.NewApp()
2023-05-03 15:38:54 +00:00
// Create application with options
err := wails.Run(&options.App{
2023-05-04 15:55:24 +00:00
Title: "RWKV-Runner",
Width: 1024,
Height: 640,
2023-05-06 12:17:39 +00:00
MinWidth: 375,
2023-05-04 15:55:24 +00:00
MinHeight: 640,
2023-05-03 15:38:54 +00:00
AssetServer: &assetserver.Options{
Assets: assets,
},
2023-05-05 15:23:34 +00:00
OnStartup: app.OnStartup,
2023-05-13 12:15:18 +00:00
Bind: []any{
2023-05-03 15:38:54 +00:00
app,
},
})
if err != nil {
println("Error:", err.Error())
}
}