* refactor: Remove unused packages and flatten project structure Removes the following unused packages: - pkg/crypt - pkg/workspace - pkg/io Moves the remaining packages (core, e, runtime) to the top level of the project. Updates all import paths to reflect the new structure. * refactor: Remove unused packages and flatten project structure Removes the following unused packages: - pkg/crypt - pkg/workspace - pkg/io Moves the remaining packages (core, e, runtime) to the top level of the project. Updates all import paths to reflect the new structure. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"embed"
|
|
"log"
|
|
|
|
"github.com/Snider/Core/runtime"
|
|
"github.com/wailsapp/wails/v3/pkg/application"
|
|
)
|
|
|
|
//go:embed all:public
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
// 1. Initialize Wails application
|
|
app := application.New(application.Options{
|
|
Assets: application.AssetOptions{
|
|
Handler: application.AssetFileServerFS(assets),
|
|
},
|
|
})
|
|
|
|
// 2. Instantiate all services using the static runtime
|
|
appServices, err := runtime.New()
|
|
if err != nil {
|
|
log.Fatalf("Failed to build application with static runtime: %v", err)
|
|
}
|
|
|
|
app.RegisterService(application.NewService(appServices.Config))
|
|
app.RegisterService(application.NewService(appServices.Display))
|
|
app.RegisterService(application.NewService(appServices.Help))
|
|
app.RegisterService(application.NewService(appServices.Crypt))
|
|
app.RegisterService(application.NewService(appServices.I18n))
|
|
app.RegisterService(application.NewService(appServices.Workspace))
|
|
|
|
log.Println("Application starting with static runtime...")
|
|
|
|
err = app.Run()
|
|
if err != nil {
|
|
log.Fatalf("Wails application failed to run: %v", err)
|
|
}
|
|
}
|