Skip to content

feat: parallel compression, finalize cmd, and PKI improvements#6

Draft
aronwk-aaron wants to merge 4 commits into
LUDevNet:mainfrom
aronwk-aaron:parallel-compression-and-finalize
Draft

feat: parallel compression, finalize cmd, and PKI improvements#6
aronwk-aaron wants to merge 4 commits into
LUDevNet:mainfrom
aronwk-aaron:parallel-compression-and-finalize

Conversation

@aronwk-aaron

Copy link
Copy Markdown

Summary

  • Parallel SD0 compression using rayon with configurable thread count (-j) and compression level (-c, default 1 for fastest)
  • New finalize subcommand for post-processing the cache: filters trunk manifest, generates frontend.txt, copies patcher.ini, and creates version/index/hotfix manifests
  • PKI config improvements: support dir spec format (directory=recursive=filter), locale-aware pack generation that routes _loc\xx_xx files to separate locale packs
  • Path normalization: virtual paths lowercased for case-insensitive consistency (LU is a Windows game)
  • Better error context in pack subcommand with per-file error messages
  • Uses local path dependency for assembly-pack to pick up the configurable compression change (depends on LUDevNet/Assembly PR)

Dependencies

  • Depends on https://github.com/LUDevNet/Assembly/pull/... (configurable compression level in SD0 converter)
  • The Cargo.toml currently uses a path = "../Assembly/modules/pack" dependency which should be updated to a version/git dependency before merge

Test plan

  • Run lupdate cache with -c 1 and -c 9 to verify compression levels work
  • Run lupdate cache -j 4 to verify thread limiting works
  • Run lupdate finalize to verify manifest generation
  • Test PKI config with locale files to verify locale pack routing
  • Verify pack subcommand still works with improved error messages

🤖 Generated with Claude Code

…ents

- Add parallel compression using rayon with configurable thread count (-j)
  and compression level (-c), defaulting to fastest (level 1)
- Add `finalize` subcommand for post-processing cache: filters trunk
  manifest, generates frontend.txt, copies patcher.ini, and creates
  version/index/hotfix manifests
- Improve PKI config parsing with support for dir spec format
  (directory=recursive=filter) and locale-aware pack generation
- Normalize virtual paths to lowercase for case-insensitive consistency
- Use local path dependency for assembly-pack to pick up compression changes
- Improve error context in pack subcommand with per-file error messages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aronwk-aaron

Copy link
Copy Markdown
Author

need to thoroughly test this

@aronwk-aaron

Copy link
Copy Markdown
Author

and wait on the assembly changes to be merged so I can point the cargo toml at the new git version

The compression field on Converter now takes Option<u32> instead of
Option<Compression>, removing the need to import flate2's type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@Xiphoseer Xiphoseer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this looks reasonable to me. It'd be nice to implement manifest writing on https://assembly.lu-dev.net/assembly_pack/txt/manifest/struct.Manifest.html

Comment thread src/cache/mod.rs Outdated
Comment thread src/pki.rs
aronwk-aaron and others added 2 commits June 23, 2026 15:37
…cale

- Rename flush_pending to compress_pending for clarity since all
  compression happens there, not just flushing a buffer
- Rewrite detect_locale to use iterator-based char extraction instead
  of vec indexing, avoiding potential panics on non-ASCII input

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Read the PKI file to find which packs have "front" in their name, collect
the CRCs of files in those packs, and include only matching trunk entries
in frontend.txt. This is more accurate than glob-matching file paths and
automatically stays in sync with the pack definitions.

Replaces --frontend-patterns with --frontend-pack-pattern (default: "front").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants