Skip to content

nuresh v0.2.0 — Bare-Metal ARM64 NEON Core (47.8 GB/s)

Latest

Choose a tag to compare

@peterlodri-sec peterlodri-sec released this 28 Nov 18:07
· 4 commits to main since this release

Changelog

All notable changes to nuresh are documented in this file.
The format follows Keep a Changelog,
and this project adheres to Semantic Versioning.

[0.2.0] - 2026-11-28

Performance (Apple Silicon ARM64 NEON + Multi-Core)

  • Zero callee-saved register spills: Rewrote all nuresh-asm inline asm! kernels to use strictly caller-saved registers (v0..v7, v16..v31) with options(nostack, readonly) on read-only kernels.
  • 128-byte Apple Silicon cache-line loops (ldp/stp): Upgraded count_byte_neon with nested in-register uadalp widening (accumulates up to 2 MiB per single uaddlv+umov, zero stall) and 16B NEON tail.
  • 64-byte 4-way unrolled case transforms: Upgraded ascii_lower_in_place_neon and ascii_upper_in_place_neon from 16B/iter to 64B/iter ldp/stp, saturating all 4 Firestorm NEON pipes.
  • 8-accumulator add.2d / fadd.2d / fmla.2d pipelines: Eliminated Firestorm 3–4 cycle ALU latency stalls in sum_i64_neon, sum_f64_neon, and dot_f64_neon.
  • Multi-core Apple Silicon P-core sharding: Added count_byte_par and ascii_lower_par (128B-aligned chunks via std::thread::scope) for buffers ≥ 4 MiB, plus madvise(Sequential | WillNeed) and <4 MiB direct read() bypass.
  • Zero-alloc single-pass nuresh sum: Replaced full-list Vec allocation and double scan with 4 KiB stack-buffered chunking and lazy i64 -> f64 promotion.
  • Sub-30µs nuresh prompt: Cached HOME via OnceLock, replaced canonicalize() with a single readlink, and directly opens .git/HEAD with a bounded 4 KiB read.
  • Added .cargo/config.toml targeting apple-m1 on aarch64-apple-darwin.

Security & Memory Safety (CaveCrew Audit)

  • Guarded file opens with O_NONBLOCK + meta.file_type().is_file() to eliminate FIFO/device hangs and non-regular file mmap crashes.
  • Fixed UTF-8 byte-slice panic risk on .git/HEAD truncation (chars().take(7)).
  • Added bounded 4 KiB reads for .git and .git/HEAD in nuresh prompt (prevents /dev/zero / huge-file DoS).
  • Validated --byte flag with u8::try_from and checked i64::try_from / checked_mul across CLI & plugin.
  • Eliminated all from_raw_parts pointer-provenance unsafe tails and out("d0") register overlap (fmov + out("v0") _).
  • Fixed component-aware HOME prefix stripping in nuresh prompt and ~ expansion in resolve_path.
  • Replaced all CLI .expect() calls and plugin assert_eq! calls with clean error returns.

Distribution & Open Source

  • Prepared all 3 crates (nuresh-asm, nuresh, nu_plugin_nuresh) for crates.io (MIT OR Apache-2.0, MSRV 1.85, docs.rs + cargo-binstall metadata).
  • Added one-liner install.sh, Homebrew Formula/nuresh.rb (8b-is/homebrew-tap), interactive GitHub Pages landing site (docs/), and GitHub Actions CI/Release/Pages workflows.

[0.1.0] - 2026-11-28

  • Initial workspace: nuresh-asm (#![no_std]), nu_plugin_nuresh (Nushell 0.117.0), and nuresh CLI.