Warning
- spuz_piston - https://crates.io/crates/spuz_piston
- spuz_spawner - unpublished yet
- spuz_wrench - unpublished yet
spuz_piston
- Description of a variety of minecraft json specifications- Version manifest
>1.12
- Asset index
- Listing
- Launcher profile
- Java runtimes manifest
- Support for older versions
<=1.12
- Docs
- Version manifest
spuz_spawner
- Helpers for spawning java runtime- Spawning java
- Easy way to apply argument changes
- Crossplatform
- Docs
spuz_wrench
- Layers forspuz_spawner
to configure java runtime command to launch game from version manifest- Support variables
>1.12
- Conditional arguments and libraries (depending on target os and arch)
1.19+
- Friendly and typed builder
- Docs
- Support variables
spuz_get
- Pack of apis to get any versions of the game, even modded, such as fabric, quilt, forge, etc.- Vanilla
- Fabric
- Forge
- Docs
spuz_folder
- To manage minecraft installations, versions, instances, mods, etc...
#[tokio::main]
async fn main() -> Result<()> {
// Lookup for manifest and load it
// We will later use `spuz_folder` for this once it is ready
let manifest = todo!();
// Use global java
// Later we will use a local installation with right version
let mut builder = CommandBuilder::new("java");
// Apply allocation arguments: -Xms1024m -Xmx4096m
builder.apply(AllocRange(1024..4096));
// Setup launcher wrench
let wrench = LauncherWrench::builder()
.manifest(&manifest)
.current_dir(&root)
.game_dir(&game_dir)
.build();
// Apply wrench
builder.apply(wrench);
// Apply player settings
builder.apply(Player::new("LIMPIX31", "268903ca-7946-400a-8984-1fdc0b8baf71"));
// Window size
builder.apply(WindowSize::new(1280, 720));
// Set if you want start in fullscreen mode
// builder.apply(Fullscreen);
// Build and spawn process
let process = builder.build().spawn()?;
// Watch for logs
while let Ok(log) = process.logs.recv().await {
print!("{log}");
}
Ok(())
}