Skip to content

deps: Rust crates of the NIF, parking_lot 0.13 - #81

Merged
rubas-agent[bot] merged 3 commits into
mainfrom
rust-deps-2026-10
Oct 23, 2026
Merged

rubas-agent[bot] merged 3 commits into
mainfrom
rust-deps-2026-10

Conversation

@rubas-agent

@rubas-agent rubas-agent Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Before

$ cargo upgrade --dry-run --incompatible allow
name        old req compatible latest new req
====        ======= ========== ====== =======
rustler     0.38.0  0.38.0     0.39.0 0.39.0
parking_lot 0.12.5  0.12.5     0.13.0 0.13.0

cargo update also had 7 newer compatible versions to lock.

Problem

The Rust crates of the NIF were behind their newest releases.

After

Crate Before After
parking_lot (direct) 0.12.5 0.13.0
lock_api 0.4.14 0.5.0
parking_lot_core 0.9.12 0.10.0
redox_syscall 0.5.18 0.9.5
cc 1.4.7 1.10.0
either 1.18.0 1.19.0
find-msvc-tools 0.1.13 0.1.15
inventory 0.3.24 0.3.25
libc 0.2.189 0.2.191
smallvec 1.16.1 1.16.3
unicode-ident 1.0.26 1.0.27
rustler (direct) 0.38.0 0.38.0, not changed

rustler stays at 0.38. Version 0.39 links the enif_* functions directly on Linux (rusterlium/rustler#764). The NIF still builds and loads, but cargo test cannot link the test binary, because no BEAM supplies these symbols:

mold: error: undefined symbol: enif_make_map_from_arrays
mold: error: undefined symbol: enif_schedule_nif
...
error: could not compile `whisper_cpp_native` (lib test) due to 1 previous error

The Hex package rustler has no 0.39 release, so mix.exs and mix.lock do not change.

Details

Commits

  1. cargo update for the compatible versions.
  2. parking_lot 0.12 to 0.13.

parking_lot 0.13. The changelog removes automatic eventual fairness, the hardware-lock-elision feature, the const_* constructors, and the recursive read methods of RwLock. It raises the MSRV to 1.95. The crate uses only Mutex::new and lock() on WhisperResource.ctx (transcribe.rs:transcribe_one). That lock holds only the short create_state() call, so fairness has no effect. We use Rust 1.98.

rustler 0.39. The upgrade guide asks for two changes: OwnedBinary::new, OwnedBinary::from_unowned, and Binary::to_owned are now infallible, and rustler::wrapper is gone. The crate uses none of them, and clippy passed with 0.39. The link error above stopped the bump. To keep 0.39, the unit tests must link without the NIF glue, for example with a separate crate for the pure logic, or the test link must ignore undefined symbols.

Checks

  • WHISPER_CPP_BUILD=1 task check: builds the NIF from source, then format, credo, clippy, mix test (62 passed), cargo test (33 passed), and zizmor. All pass.
  • WHISPER_CPP_BUILD=1 task test:integration: real inference with the source-built NIF, 86 passed.

@rubas-agent
rubas-agent Bot merged commit 97434fa into main Oct 23, 2026
1 check passed
@rubas-agent
rubas-agent Bot deleted the rust-deps-2026-10 branch October 23, 2026 10:57
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.

1 participant