feat(larod): Add safe Rust bindings - #230
Open
vsem-azamat wants to merge 1 commit into
Open
vsem-azamat wants to merge 1 commit into
vsem-azamat wants to merge 1 commit into
Conversation
6 tasks
vsem-azamat
force-pushed
the
feature/larod-completion
branch
3 times, most recently
from
July 5, 2026 13:12
0290b9c to
c99f6ae
Compare
vsem-azamat
marked this pull request as ready for review
July 6, 2026 10:15
vsem-azamat
marked this pull request as draft
July 6, 2026 10:17
vsem-azamat
force-pushed
the
feature/larod-completion
branch
from
September 3, 2026 19:43
c99f6ae to
3c9417c
Compare
Add a safe wrapper crate for larod-sys covering connections, devices, models, maps, tensors, job requests, errors, host-safe tests, and device-gated tests. Since larod is documented as not thread safe, every FFI call is serialized through one process-wide lock and all handle types are !Send + !Sync, enforced by compile-fail doctests. Raw tensor fd access is unsafe with an explicit ownership contract, and fd allocation uses a closed FdRequirements type mapping to the documented LAROD_FD_PROP_* flags.
vsem-azamat
force-pushed
the
feature/larod-completion
branch
from
September 3, 2026 19:43
3c9417c to
b4cd333
Compare
vsem-azamat
marked this pull request as ready for review
September 3, 2026 19:46
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.
Safe Rust wrapper for the larod C API
Adds a new
larodcrate with safe Rust bindings around the larod C API. The wrapper covers connection management, device enumeration, model loading/retrieval, tensor allocation, job requests, parameter maps, and error handling.Review focus
Current status
main(ACAP Native SDK 12.11.0, armv7hf support).!Send + !Sync(compile-fail doctests). Feedback on this trade-off is welcome:JobRequest::runholds the lock for the duration of inference.Result<c_int>; larod has no "unset fd" sentinel, onlyLAROD_INVALID_FDon error.device-testshave not been run on a device yet.Local verification
cargo fmt -p larod -- --checkgit diff --checkcargo test -p larodcargo clippy -p larod --all-targets -- -D warningsRUSTDOCFLAGS="-Dwarnings" cargo doc -p larod --document-private-items --no-depsIssue ticket number and link
Checklist before requesting a review