Skip to main content

link_runtime

Function link_runtime 

Source
pub fn link_runtime() -> Result<()>
Expand description

Point ONNX Runtime at the library shipped beside this binary.

Only in a dynamic-ort build, which is the two Linux release binaries and nothing else. Every other build — cargo install, macOS, Windows, a developer’s own cargo build — links the library ort downloads at build time and this function does nothing.

The reason the Linux artifacts differ is issue #57: the library ort downloads references glibc 2.38 symbols, so the binary built against it cannot start on Debian 12, Ubuntu 22.04 LTS, RHEL 9 or Amazon Linux 2023, and building on an older runner cannot lower a floor the vendored library sets. Microsoft’s own ONNX Runtime release needs glibc 2.27, so the release jobs pack that beside the binary and this loads it.

Run once, before anything asks for a model.