intel / intel/openvino-rs

Retrieve OpenVINO sources during build.rs instead of as a Git submodule

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
idea
Dominant language
Rust
Stars
134
Forks
34
PR merge metrics
No merged PRs in 30d

Description

When building openvino-rs, if there is no installed version of OpenVINO available, Cargo attempts to build OpenVINO itself using the sources pulled in as a Git submodule. The sources do not fit in to the 10MB crate limit, so this build option will not work for users of openvino-rs (hence the addition of `OPENVINO_SKIP_LINKING` to allow, e.g., docs.rs to build the crate).

Instead, we could add `git2` as a dev dependency and pull the sources from there to build. This is not optimal for several reasons: it is slow and it alters the sources during a Cargo build (an anti-pattern). There are examples of this type of thing being done, though; [intel-mkl-src](https://crates.io/crates/intel-mkl-src) is pulling binaries from S3.

Alternately, the ["build from source"](https://github.com/intel/openvino-rs/blob/main/crates/openvino-sys/build.rs#L179-L181) should just be removed.

Contributor guide

Open the contributing guide

Research direction

Start in crates/openvino-sys/build.rs, especially the build-from-source section linked around lines 179–181, and inspect how the Git submodule is used when no installed OpenVINO is found. Compare the proposed git2 retrieval approach with removing that build path; done requires resolving which approach avoids the crate-size problem while preserving a clear Cargo build outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
build-system
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.