feat(rust,gui): RLE compression codec + Rust Lab desktop app

Rust kernel expansion:
- rust/src/compress/mod.rs (new): memory-safe PackBits-style run-length
  encoding codec (rle_compress / rle_decompress) with C-ABI shims, registered
  in lib.rs. C fallbacks added to rust_fallback.c so aarch64/armv8i match.
- include/kernel/rust.h: FFI declarations for the codec.
- LazyBox: new `rle <text>` applet that compresses, decompresses, prints the
  ratio and verifies the round-trip is lossless.

GUI expansion:
- gui/gui_apps.c: "Rust Lab" app -- a live dashboard for the Rust subsystem.
  Shows CRC-32C/Adler-32 of a sample, measured ChaCha20/SHA3-256/AES-128
  throughput as scaled bars plus a composite score (benchmark run once at
  launch and cached), and a live ChaCha20 CSPRNG byte stream refreshed
  periodically. Per-window state freed on close.
- Registered "Rust Lab" (info icon) in the desktop app table and on the
  desktop; desktop icon indices updated for the new entry.

Verified: clean build on x86_64/aarch64/armv8i; boots through the SUB login to
the desktop with the new Rust Lab icon rendering (screenshotted); checksum
self-test prints, 0 panics / 0 OOM.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
This commit is contained in:
subhobhai943andClaude Opus 4.8 committed 2026-08-25 20:06:13 +05:30
1 parent e93b994469
commit c414c20b44
8 files changed
+262 -2

No files matched your search

+4
View File
@@ -76,6 +76,10 @@ uint32_t rust_crc32c(const uint8_t* data, size_t len);
uint32_t rust_adler32(const uint8_t* data, size_t len);
uint64_t rust_fnv1a64(const uint8_t* data, size_t len);
// Run-Length Encoding Codec (Rust). Return bytes written, or -1.
int rust_rle_compress(const uint8_t* in_buf, size_t in_len, uint8_t* out_buf, size_t max_out);
int rust_rle_decompress(const uint8_t* in_buf, size_t in_len, uint8_t* out_buf, size_t max_out);
// Cryptography
int rust_chacha20_crypt(const uint8_t* key, const uint8_t* nonce, uint32_t counter, uint8_t* data, size_t len);
int rust_csprng_get_random(uint8_t* buffer, size_t len);