Skip to main content

Crate rightkit_ort

Crate rightkit_ort 

Source
Expand description

Product-neutral ONNX Runtime dynamic-library resolution, environment and session setup for Right Suite apps.

Merged from ScrapeRight ort_common (installed-bundle layout, system-DLL hazard) and HeardRight heardright-onnx-asr (environment, execution providers, session builder). Product environment variables and data roots stay in app adapters.

Re-exports§

pub use environment::cpu_thread_budget;
pub use environment::init_environment;
pub use environment::shared_pool_active;
pub use environment::EnvironmentOptions;
pub use environment::EnvironmentReport;
pub use environment::GlobalPool;
pub use probe::probe_providers;
pub use probe::ProviderDiagnostic;
pub use probe::ProviderKind;
pub use session::BuiltSession;
pub use session::ExecutionProvider;
pub use session::SessionError;
pub use session::SessionOptions;
pub use ort;

Modules§

environment
Process-wide ORT environment initialisation (merged from HeardRight heardright-onnx-asr/environment.rs, product experiment switches removed).
probe
Execution-provider availability probe against the loaded runtime.
session
Session construction and execution-provider selection (merged from HeardRight heardright-onnx-asr/session.rs; HR_ONNX_*_EXPERIMENT environment switches dropped as product policy).

Structs§

CandidateDiagnostic
RuntimeCandidate
RuntimeSelection

Enums§

CandidateSource
RuntimeError

Functions§

configure_runtime
Configure ORT only after resolving a caller-supplied, absolute regular file. Existing configuration is preserved and must canonicalize to the same file.
inspect_candidate
installed_resource_dir
Resources directory of an installed application bundle, derived from its executable only (no checkout or working-directory fallback): macOS Foo.app/Contents/MacOS/foo -> Contents/Resources; Windows the executable directory; elsewhere <exe dir>/resources.
installed_runtime_candidate
Bundled-runtime candidate for an installed app: <resources>/<subdir>/<runtime file>. Apps pass their own subdir (ScrapeRight/HeardRight/CodeRight all use runtime).
is_system_runtime
True when the path sits under a Windows System32/SysWOW64 directory. The OS copy of onnxruntime.dll (Windows ML) hangs at session init, so it is never an acceptable candidate (ScrapeRight ort_common finding).
resolve_runtime
runtime_filename