Repository navigation
deps: Rust crates of the NIF, parking_lot 0.13 - #81
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
cargo updatealso had 7 newer compatible versions to lock.Problem
The Rust crates of the NIF were behind their newest releases.
After
parking_lot(direct)lock_apiparking_lot_coreredox_syscallcceitherfind-msvc-toolsinventorylibcsmallvecunicode-identrustler(direct)rustlerstays at 0.38. Version 0.39 links theenif_*functions directly on Linux (rusterlium/rustler#764). The NIF still builds and loads, butcargo testcannot link the test binary, because no BEAM supplies these symbols:The Hex package
rustlerhas no 0.39 release, somix.exsandmix.lockdo not change.Details
Commits
cargo updatefor the compatible versions.parking_lot0.12 to 0.13.parking_lot 0.13. The changelog removes automatic eventual fairness, the
hardware-lock-elisionfeature, theconst_*constructors, and the recursive read methods ofRwLock. It raises the MSRV to 1.95. The crate uses onlyMutex::newandlock()onWhisperResource.ctx(transcribe.rs:transcribe_one). That lock holds only the shortcreate_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, andBinary::to_ownedare now infallible, andrustler::wrapperis 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.