Skip to content

chore(deps): upgrade faster-hex to 2.1 and simplify hex call sites - #37248

Open
zhangsoledad wants to merge 2 commits into
denoland:mainfrom
zhangsoledad:chore/upgrade-faster-hex-2.1
Open

zhangsoledad wants to merge 2 commits into
denoland:mainfrom
zhangsoledad:chore/upgrade-faster-hex-2.1

Conversation

@zhangsoledad

@zhangsoledad zhangsoledad commented Nov 30, 2026 •

Copy link
Copy Markdown

Summary

Upgrade workspace faster-hex from 0.10.0 (0.10.1) to 2.1 (2.1.0) with default-features = false, features = ["std"], and simplify existing faster_hex call sites with faster-hex 2.x APIs.

Motivation

  • AArch64 NEON decoding, AVX-512BW & 2.x APIs: faster-hex 0.10.1 has AArch64 NEON encoding/checking but falls back to scalar decoding on AArch64 and has no AVX-512BW path. 2.1 adds AArch64 NEON decoding, AVX-512BW validation/decoding, refined short-input SIMD/scalar paths, and 2.x checked/formatting APIs (hex_decode_array, hex_decode_vec, Hex, Hex::leading_digits).
  • Cleaner dependency graph: Disabling the unused default serde feature and upgrading past 0.10.1 removes heapless 0.8.0 and hash32 0.3.1 from Cargo.lock (and drops faster-hex's own autocfg build dependency).
  • No MSRV impact: faster-hex 2.1 requires Rust 1.95.0, which matches rust-toolchain.toml.

Changes

  • Cargo.toml / Cargo.lock: Upgrade faster-hex to { version = "2.1", default-features = false, features = ["std"] }.
  • ext/kv/lib.rs: Use faster_hex::hex_decode_array::<10> for versionstamp decoding instead of a manual [0u8; 10] buffer and length check.
  • ext/node_crypto/keys.rs: Use faster_hex::hex_decode_vec for legacy PEM IV decoding to return Vec<u8> directly instead of a manual even-length check and vec![0u8; ...].
  • cli/tools/compile.rs: Format temporary filename suffix directly with faster_hex::Hex instead of a stack [0u8; 16] buffer and .unwrap().
  • cli/tools/desktop.rs: Use Hex::leading_digits(16).to_string() in payload_hash (instead of encoding all 64 digits then slicing and reallocating), and drop redundant .to_lowercase() on hex_string.
  • runtime/ops/desktop.rs: Drop redundant .to_lowercase() on faster_hex::hex_string.

Verification

  • cargo fmt -- --check
  • cargo metadata --locked & cargo check --locked -p deno_npm_cache
  • cargo clippy -p deno_npm_cache -p deno_kv -p deno_node_crypto -p deno_runtime -p deno -- -D warnings
  • cargo clippy -p deno -p test_server --tests -- -D warnings
  • cargo test -p deno_npm_cache
  • cargo test -p deno --lib -- desktop (130 passed) and cargo test -p deno --lib -- checksum

@zhangsoledad
zhangsoledad marked this pull request as draft November 30, 2026 05:18
@zhangsoledad
zhangsoledad marked this pull request as ready for review November 30, 2026 05:26
@zhangsoledad
zhangsoledad force-pushed the chore/upgrade-faster-hex-2.1 branch from 385c45b to 0593e75 Compare November 30, 2026 08:32
@CLAassistant

CLAassistant commented Nov 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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