pub struct AppConfig {
pub name: String,
pub id: String,
pub version: String,
pub author: String,
pub icon: String,
pub home: String,
pub max_memory_mb: u32,
pub job_threads: u32,
}Expand description
Names, identifies, and sizes the application.
Declare at most one AppConfig per world. It supplies the display name,
bundle identifier, version, author, and icon that the export step reads when
it packages the world into a distributable game (the archive and executable
name, and on macOS the .app bundle metadata and icon). When the world
declares no Window title of its own, name also fills the window
title, so a running game shows its own name in the title bar.
icon is a path to a source image (a square PNG, 512x512 or larger)
relative to the world; it is read by the packaging step and is not compiled
into the world’s data. id is a reverse-DNS bundle identifier
(e.g. gg.studio.mygame); when left empty the export derives one from
name. Empty string fields mean “unset”.
home chooses where the running application keeps what it writes: the
settings file, the save files, crash reports, and the shader caches. Leave
it empty and those sit beside the application’s data, which is what a
portable install wants. A relative path resolves against that same content
directory, so "state" puts them in a state/ subfolder; an absolute path
is used verbatim. A read-only install that sets no home relocates them to
a per-user directory on its own.
max_memory_mb and job_threads are 0 for “auto”, where the engine sizes
both from the host machine. A non-zero value overrides that choice, clamped
to what the machine can safely give.
Fields§
§name: StringDisplay name of the application: the game’s window title, the exported archive and executable name, and the macOS bundle display name.
id: StringReverse-DNS bundle identifier (e.g. gg.studio.mygame). When empty the
export derives one from name.
version: StringHuman-readable version string (e.g. 1.0.0).
Author or studio name, recorded in the exported bundle’s metadata.
icon: StringPath to a source icon image (a square PNG, 512x512 or larger) relative to the world, used to build the platform icon at export time. Empty for no custom icon.
home: StringWhere the running application writes its settings, saves, crash reports, and shader caches. Empty means beside the application’s data; a relative path resolves against that directory; an absolute path is used verbatim.
max_memory_mb: u32Soft ceiling on host memory the runtime aims to stay under, in
mebibytes. 0 = auto (a fraction of total RAM, capped by a built-in
ceiling). A non-zero value is clamped so it never exceeds what the
machine can safely give.
job_threads: u32Worker threads for the shared job pool. 0 = auto (one per core, less
one for the main thread). A non-zero value never exceeds the core count.
Trait Implementations§
Source§impl Clone for AppConfigArgs
impl Clone for AppConfigArgs
Source§fn clone(&self) -> AppConfigArgs
fn clone(&self) -> AppConfigArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more