Documentation
¶
Overview ¶
Package application owns the imzero2 process lifecycle: configuration parsing, observability bootstrap, render-loop driver wiring, profiling hooks, and graceful shutdown. The Application[U] generic parameterizes the FFFI2 unmarshaller plugged into the Rust child process.
Index ¶
- Variables
- type Application
- type Config
- type FontTweakConfig
- type ImZeroClientConfig
- func (inst *ImZeroClientConfig) FromContext(nameTransf config.NameTransformFunc, ctx *cli.Context) (nMessages int)
- func (inst *ImZeroClientConfig) PassthroughArgs(args []string) (argsOut []string)
- func (inst *ImZeroClientConfig) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag
- func (inst *ImZeroClientConfig) Validate(force bool) (nMessages int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNeedsToBeLaunchedBeforeRun = eh.Errorf("application needs to be launched before run")
View Source
var PackageProps = packageprops.Props{ WASMWASI: packageprops.WASMCompiles, WASMJS: packageprops.WASMCompiles, WASMFreestanding: packageprops.WASMCompiles, }
PackageProps records this package's curated properties (ADR-0080). Seeded by `wasmsurvey props generate`; curate by hand, then `wasmsurvey props verify`.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application[U runtime.UnmarshallReaderI] struct { FffiEstablishedHandler func(fffi *runtime.Fffi2[U]) error BeforeFirstFrameInitHandler func() error RenderLoopHandler func() error Config *Config // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication[U runtime.UnmarshallReaderI](cfg *Config, unmarshaller U) (app *Application[U], err error)
func (*Application[U]) Launch ¶
func (inst *Application[U]) Launch() (err error)
func (*Application[U]) Run ¶
func (inst *Application[U]) Run() (err error)
type Config ¶
type Config struct {
ImZeroSkiaClientConfig *ImZeroClientConfig
MainFontTTF string
MonoFontTTF string
PhosphorFontTTF string
FallbackFontTTF string
MainFontTweak FontTweakConfig
MonoFontTweak FontTweakConfig
PhosphorFontTweak FontTweakConfig
FallbackFontTweak FontTweakConfig
ClientBinary string
ImZeroCmdOutFile string
ImZeroCmdInFile string
MainFontSizeInPixels float32
// contains filtered or unexported fields
}
func (*Config) FromContext ¶
func (*Config) ToCliFlags ¶
func (inst *Config) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag
type FontTweakConfig ¶
type ImZeroClientConfig ¶
type ImZeroClientConfig struct {
AppTitle string `json:"appTitle"`
Fullscreen string `json:"fullscreen"`
InitialMainWindowWidth string `json:"initialMainWindowWidth"`
InitialMainWindowHeight string `json:"initialMainWindowHeight"`
AllowMainWindowResize string `json:"allowMainWindowResize"`
ExportBasePath string `json:"exportBasePath"`
Vsync string `json:"vsync"`
BackgroundColorRGBA string `json:"backgroundColorRGBA"`
BackdropFilter string `json:"backdropFilter"`
// contains filtered or unexported fields
}
func (*ImZeroClientConfig) FromContext ¶
func (inst *ImZeroClientConfig) FromContext(nameTransf config.NameTransformFunc, ctx *cli.Context) (nMessages int)
func (*ImZeroClientConfig) PassthroughArgs ¶
func (inst *ImZeroClientConfig) PassthroughArgs(args []string) (argsOut []string)
func (*ImZeroClientConfig) ToCliFlags ¶
func (inst *ImZeroClientConfig) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag
func (*ImZeroClientConfig) Validate ¶
func (inst *ImZeroClientConfig) Validate(force bool) (nMessages int)
Click to show internal directories.
Click to hide internal directories.