{"record":{"id":"08c041a05e4c3795","repo":"tonhowtf/omniget","slug":"a-microsoft-n-o-publica-onnx-runtime-pronto-para-este","errorCode":null,"errorMessage":"a Microsoft não publica ONNX Runtime pronto para este sistema; instale a partir de um arquivo local (pacote `onnxruntime` do pip, por exemplo)","messagePattern":"a Microsoft não publica ONNX Runtime pronto para este sistema; instale a partir de um arquivo local \\(pacote `onnxruntime` do pip, por exemplo\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/onnxrt.rs","lineNumber":167,"sourceCode":"            recommended: Some(a.id) == auto,\n        })\n        .collect()\n}\n\nfn asset_by_id(id: &str) -> Option<&'static Asset> {\n    ASSETS.iter().find(|a| a.id == id)\n}\n\nfn pick_asset(variant: Option<&str>) -> anyhow::Result<&'static Asset> {\n    let wanted = variant\n        .map(|s| s.trim())\n        .filter(|s| !s.is_empty() && *s != \"auto\");\n    if let Some(id) = wanted {\n        return asset_by_id(id)\n            .ok_or_else(|| anyhow!(\"variante de ONNX Runtime desconhecida: {id}\"));\n    }\n    let auto = auto_variant_id().ok_or_else(|| {\n        anyhow!(\n            \"a Microsoft não publica ONNX Runtime pronto para este sistema; \\\n             instale a partir de um arquivo local (pacote `onnxruntime` do pip, por exemplo)\"\n        )\n    })?;\n    asset_by_id(auto).ok_or_else(|| anyhow!(\"variante {auto} sumiu do catálogo\"))\n}\n\npub fn target_dir() -> Option<PathBuf> {\n    crate::core::paths::app_data_dir().map(|d| d.join(\"onnxruntime\"))\n}\n\npub fn target_path() -> Option<PathBuf> {\n    target_dir().map(|d| d.join(lib_filename()))\n}\n\npub fn version_marker_path() -> Option<PathBuf> {\n    target_dir().map(|d| d.join(\"onnxruntime.version\"))\n}","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/onnxrt.rs#L149-L185","documentation":"When no explicit variant is requested, pick_asset calls auto_variant_id() to detect the current OS/arch; if no prebuilt Microsoft ONNX Runtime asset matches this platform, it returns this error telling the user to install a local build (e.g. the pip `onnxruntime` package) rather than downloading something unsupported.","triggerScenarios":"install_runtime called with variant None/\"auto\"/empty on a system whose OS/arch/libc combo has no entry in the asset catalog — auto_variant_id() returns None.","commonSituations":"Unsupported targets: FreeBSD, musl/Alpine, exotic Linux archs (riscv64, armv7), very old glibc, or Windows-on-ARM without a matching asset.","solutions":["Run on a supported platform (Windows x64, macOS x64/arm64, Linux x64/arm64 with common glibc)","Install ONNX Runtime locally (pip install onnxruntime) and point the app at the local install instead of downloading","Set an explicit variant id that has a catalog asset for a compatible platform","Contribute/add an asset entry to the catalog for the target platform"],"exampleFix":"// unsupported platform (e.g. Alpine musl)\n# fix: provide local runtime\npip install onnxruntime\n# then configure app to use local onnxruntime instead of auto-install","handlingStrategy":"fallback","validationCode":"// check platform support before attempting auto install\nif onnxrt::auto_variant_id().is_none() {\n    eprintln!(\"no prebuilt ONNX Runtime for this platform; install locally via pip\");\n}","typeGuard":null,"tryCatchPattern":"match onnxrt::install_runtime(None) {\n    Err(e) if e.to_string().contains(\"não publica ONNX Runtime\") => {\n        // use a locally installed runtime instead of downloading\n        use_local_onnx_runtime_from_pip()?;\n    }\n    other => other?,\n}","preventionTips":["Document supported platforms and check them at app startup","Bundle or detect a local pip onnxruntime as fallback on exotic platforms","Show the informative error text to the user instead of a generic failure","Keep the asset catalog updated as new platform targets are added"],"tags":["onnx","platform","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}