Releases: seiunx-dev/unity-rs
Release list
unity-rs 0.5.2
API
- Caller-selected Shader read limits.
StudioObject::read_shader_text_with_limits(ShaderReadLimits)lets Rust callers choose every Shader read budget instead of only the output cap.read_shader_text(maximum_output_bytes)is unchanged and still usesShaderReadLimits::default(); no default limit was relaxed. A real Unity 6000.3 URP shader totals 4,010,378 array elements, above the default 4,000,000, so exporters that expect such shaders can now opt into a larger total explicitly. Exceeding a supplied budget still returns the same limit error. - Python and Node keep their existing
read_shader(maximum_bytes)/readShader(maximumBytes)surface; the new method is Rust-only.
Compatibility
- No change to parsing, output bytes or error families for existing calls.
- Minimum Rust version remains 1.88.
unity-rs 0.5.1
Performance
- Adaptive PNG filtering is faster; output bytes are unchanged. The Paeth predictor now runs in a byte-domain max/min form the compiler autovectorizes (an exhaustive test proves it equal to the specification arithmetic over all 2^24 inputs, tie order included), the per-filter heuristic sums accumulate in vector-friendly
u32blocks, and every candidate pass after the first abandons block by block once its partial sum can no longer win — the partial sum is a lower bound, so filter selection is exactly the same. Measured on a real 1,250-bundle / 2,075-texture ASTC corpus,fastPNG encoding drops about 8% (20.6 → 18.9 ms per 2520×1440 texture); the Paeth kernels alone run 2.5–3× faster. Every compression × filter configuration was verified byte-identical to 0.5.0.
Full changelog: v0.5.0...v0.5.1
unity-rs 0.5.0
Breaking change
The PNG auto filter now writes adaptively filtered scanlines at every compression effort. Previously auto paired adaptive filtering only with the fast effort and left the flate2 levels (default, best, explicit levels 1–9) unfiltered, which made raising png_compression produce larger and slower output on continuous-tone content (a 2,075-texture corpus measured +13% size and 2.1–2.6× CPU going from fast to default). Decoded pixels are unchanged — PNG filtering is lossless — but the default PNG bytes of exports and encodes differ from 0.4.x. If you depend on the previous bytes, pass png_filter: none / --png-filter none to restore the historical filter-type-0 stream, or pin 0.4.x. The stored level 0 stays unfiltered, and fast output is byte-identical to 0.4.x.
Performance
- The Python binding now releases the GIL while copying payloads of 64 KiB and larger into
bytesresults (rgba, audio/binary payloads, JSON, FBX/OBJ, encoded images). Under four threads re-reading a 4 MiBrgba, other Python threads previously kept only 19% of their idle throughput and aggregate copy throughput scaled negatively; the detached copy restores positive scaling (5,385 → 7,542 it/s across 8 threads) with no measurable single-thread cost. A multithreading audit confirmed every heavy entry point already runs detached, cache critical sections stay short, and file reads use lock-freepread.
Maintenance
- Local CI now clears stale core crate archives and Python wheels/sdists across version bumps, so packaging audits only ever see the artifacts the current run produced.
Full changelog: v0.4.0...v0.5.0
unity-rs 0.4.0
Breaking change
LDR ASTC textures now decode with the ASTC specification's top-byte conversion, matching Khronos astcenc, UnityPy, and GPU output byte for byte. Output differs from 0.3.x by at most one level per channel on some texels; pin 0.3.x if you depend on the previous AssetStudio-compatible rounding. Committed astcenc reference vectors are the normative test gate, and the managed differential now carries the remaining deviation as a declared, bounded contract. HDR ASTC and BC6H are unchanged.
Fixes
- Binary FBX array compression feeds deflate in 16 KiB chunks (~1.5x faster, byte-identical output) and Core exposes a Fast compression effort (7.5-12.6x on mesh float arrays)
- Extraction no longer decompresses every UnityFS entry in full just to probe its header
- Single-block (typically LZMA) bundles decode each block once per walk instead of once per entry (2.95x on a 17 MB bundle, reaching the raw decode floor)
- CI caches cargo registries and build artifacts, and core-crate packaging is immune to restored caches
Full Changelog: v0.3.0...v0.4.0
unity-rs 0.3.0
Highlights
- Per-object image encoding lands across Rust, CLI, Python, and Node: PNG compression presets and zlib levels, filter control, JPEG sampling/progressive/optimized-Huffman knobs, and QOI output
- PNG encoder hot spots replaced with
crc32fastandfdeflate, and adaptive filtering rewritten as per-filter scanline loops with store-free selection passes - Decoded sprite atlas pages are cached across sprite decodes, with cache statistics exposed through Python and Node
- Texture decode gains linear per-format loops and a maintained first-party ASTC decoder
- Linux wheels now build against the manylinux_2_28 floor through zig cross-linking, widening the supported distribution range
Full Changelog: v0.2.0...v0.3.0
unity-rs 0.2.0
What's Changed
- [Feat] Add trusted PyPI publishing by @MejiroRina in #2
- [Chore] Prepare 0.2.0 release by @MejiroRina in #3
Full Changelog: https://github.com/seiunx-dev/unity-rs/commits/v0.2.0