pub struct LaunchOptions {Show 19 fields
pub path: PathBuf,
pub version: String,
pub authenticator: Authenticator,
pub timeout_secs: u64,
pub download_concurrency: u32,
pub verify_concurrency: u32,
pub memory: MemoryConfig,
pub java: JavaOptions,
pub loader: LoaderConfig,
pub screen: ScreenConfig,
pub verify: bool,
pub game_args: Vec<String>,
pub jvm_args: Vec<String>,
pub instance: Option<String>,
pub url: Option<String>,
pub mcp: Option<String>,
pub intel_enabled_mac: bool,
pub bypass_offline: bool,
pub skip_bundle_check: bool,
}Expand description
Complete configuration for a launcher session.
Pass to Launcher::new(). Every field except path, version, and
authenticator has a sensible default so callers only need to set what
differs from the defaults.
Fields§
§path: PathBufAbsolute base path for all launcher data (libraries/, assets/, versions/, runtime/, …).
version: StringMinecraft version: concrete ("1.20.4") or alias
("latest_release" / "r" / "lr" / "latest_snapshot" / "s" / "ls").
authenticator: AuthenticatorAuthentication credentials — required.
timeout_secs: u64HTTP request timeout in seconds (default: 10).
download_concurrency: u32Concurrent download workers, clamped to 1–30 (default: 5).
verify_concurrency: u32Concurrent SHA-1 verify workers, clamped to 1–16 (default: 4).
Lower than download_concurrency to avoid disk seek thrashing on HDDs.
memory: MemoryConfig§java: JavaOptions§loader: LoaderConfig§screen: ScreenConfig§verify: boolRe-verify SHA-1 integrity of every file after download (default: false).
game_args: Vec<String>Extra arguments appended after the vanilla game arg list.
jvm_args: Vec<String>Extra arguments prepended to the JVM arg list.
instance: Option<String>Named instance for multi-instance support.
When set, data lives under <path>/instances/<instance>/.
url: Option<String>URL for custom additional assets (optional).
mcp: Option<String>Path to a custom Minecraft JAR (mod compatibility parameter).
intel_enabled_mac: boolmacOS only: force x64 Java even on Apple Silicon (Rosetta 2).
bypass_offline: boolRedirect Mojang auth endpoints to an invalid domain so offline multiplayer works without a valid session (default: false).
skip_bundle_check: boolWhen true and gameData.json already exists on disk, skip the
bundle integrity check and load directly from cache (fast launch).
Falls through to the normal download path when the cache is absent.
Default: false (always verify — current behaviour preserved).
Implementations§
Source§impl LaunchOptions
impl LaunchOptions
Sourcepub fn save_dir(&self) -> PathBuf
pub fn save_dir(&self) -> PathBuf
Directory where gameData.json is stored.
Returns <path>/instances/<instance> when instanced, otherwise <path>.
Sourcepub fn loader_dir(&self, name: &str) -> PathBuf
pub fn loader_dir(&self, name: &str) -> PathBuf
Root directory for a specific mod loader’s files.
Returns <path>/loader/<name> unless loader.path is set explicitly.
Sourcepub fn clamped_concurrency(&self) -> u32
pub fn clamped_concurrency(&self) -> u32
download_concurrency clamped to the valid range 1–30.
Sourcepub fn clamped_verify_concurrency(&self) -> u32
pub fn clamped_verify_concurrency(&self) -> u32
verify_concurrency clamped to the valid range 1–16.
Trait Implementations§
Source§impl Clone for LaunchOptions
impl Clone for LaunchOptions
Source§fn clone(&self) -> LaunchOptions
fn clone(&self) -> LaunchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more