BlueGit

ict rusty-teams

fix(calling): Linux test builds link again, ONNX Runtime loads at run time there too

- The static libonnxruntime.a pulled the cxx crate's own cxx.o in for libstdc++ template instances; its cxxbridge symbols then clashed with the libc++ copy webrtc-sys builds (mold: duplicate symbol).
- Linux now uses ort load-dynamic like Windows: ORT_DYLIB_PATH or libonnxruntime.so, else the tract fallback.
- The ladder test only runs ONNX models when the runtime loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-16 · 6 weeks ago

Hash
43107c663eb61cef0447fc873f7331128a3151ec
Parent
f723dbae
4 files changed +10 −147
Cargo.lock +2 −144
@@ -870,12 +870,6 @@ version = "0.23.1"
870 870 source = "registry+https://github.com/rust-lang/crates.io-index"
871 871 checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
872 872
873 [[package]]
874 name = "base64ct"
875 version = "1.8.3"
876 source = "registry+https://github.com/rust-lang/crates.io-index"
877 checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
878
879 873 [[package]]
880 874 name = "bindgen"
881 875 version = "0.65.1"
@@ -2189,16 +2183,6 @@ dependencies = [
2189 2183 "tract-pulse",
2190 2184 ]
2191 2185
2192 [[package]]
2193 name = "der"
2194 version = "0.8.2"
2195 source = "registry+https://github.com/rust-lang/crates.io-index"
2196 checksum = "a878c850e9e421b20262e9b41f9c860e4785fa07541c266b62ff9d1ef998a80a"
2197 dependencies = [
2198 "pem-rfc7468",
2199 "zeroize",
2200 ]
2201
2202 2186 [[package]]
2203 2187 name = "deranged"
2204 2188 version = "0.5.8"
@@ -4091,6 +4075,8 @@ dependencies = [
4091 4075 [[package]]
4092 4076 name = "gpui-pre-windows"
4093 4077 version = "0.3.8"
4078 source = "registry+https://github.com/rust-lang/crates.io-index"
4079 checksum = "371f9bb13f97e3bea2f8b8e5e81232bb74d735153c244ae67f7400e743925b1c"
4094 4080 dependencies = [
4095 4081 "accesskit",
4096 4082 "accesskit_windows",
@@ -4375,12 +4361,6 @@ dependencies = [
4375 4361 "digest 0.10.7",
4376 4362 ]
4377 4363
4378 [[package]]
4379 name = "hmac-sha256"
4380 version = "1.1.15"
4381 source = "registry+https://github.com/rust-lang/crates.io-index"
4382 checksum = "1ad320b3b96fb2a455a0726d16efe0a5afdbd34b71dea5bc53b05ea057714d4e"
4383
4384 4364 [[package]]
4385 4365 name = "home"
4386 4366 version = "0.5.12"
@@ -5377,12 +5357,6 @@ dependencies = [
5377 5357 "num-traits",
5378 5358 ]
5379 5359
5380 [[package]]
5381 name = "lzma-rust2"
5382 version = "0.15.8"
5383 source = "registry+https://github.com/rust-lang/crates.io-index"
5384 checksum = "e20f57f9918e5bd7bc58c22cdd70a6afc7375d4dd9683af5f2b34bd3d2bba619"
5385
5386 5360 [[package]]
5387 5361 name = "mac"
5388 5362 version = "0.1.1"
@@ -5742,23 +5716,6 @@ dependencies = [
5742 5716 "getrandom 0.2.17",
5743 5717 ]
5744 5718
5745 [[package]]
5746 name = "native-tls"
5747 version = "0.2.18"
5748 source = "registry+https://github.com/rust-lang/crates.io-index"
5749 checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
5750 dependencies = [
5751 "libc",
5752 "log",
5753 "openssl",
5754 "openssl-probe",
5755 "openssl-sys",
5756 "schannel",
5757 "security-framework",
5758 "security-framework-sys",
5759 "tempfile",
5760 ]
5761
5762 5719 [[package]]
5763 5720 name = "ndarray"
5764 5721 version = "0.17.2"
@@ -6598,49 +6555,12 @@ dependencies = [
6598 6555 "libc",
6599 6556 ]
6600 6557
6601 [[package]]
6602 name = "openssl"
6603 version = "0.10.81"
6604 source = "registry+https://github.com/rust-lang/crates.io-index"
6605 checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
6606 dependencies = [
6607 "bitflags 2.13.2",
6608 "cfg-if 1.0.5",
6609 "foreign-types 0.3.2",
6610 "libc",
6611 "openssl-macros",
6612 "openssl-sys",
6613 ]
6614
6615 [[package]]
6616 name = "openssl-macros"
6617 version = "0.1.1"
6618 source = "registry+https://github.com/rust-lang/crates.io-index"
6619 checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
6620 dependencies = [
6621 "proc-macro2",
6622 "quote",
6623 "syn 2.0.119",
6624 ]
6625
6626 6558 [[package]]
6627 6559 name = "openssl-probe"
6628 6560 version = "0.2.1"
6629 6561 source = "registry+https://github.com/rust-lang/crates.io-index"
6630 6562 checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
6631 6563
6632 [[package]]
6633 name = "openssl-sys"
6634 version = "0.9.117"
6635 source = "registry+https://github.com/rust-lang/crates.io-index"
6636 checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
6637 dependencies = [
6638 "cc",
6639 "libc",
6640 "pkg-config",
6641 "vcpkg",
6642 ]
6643
6644 6564 [[package]]
6645 6565 name = "option-ext"
6646 6566 version = "0.2.0"
@@ -6687,7 +6607,6 @@ dependencies = [
6687 6607 "ort-sys",
6688 6608 "smallvec",
6689 6609 "tracing",
6690 "ureq",
6691 6610 ]
6692 6611
6693 6612 [[package]]
@@ -6695,11 +6614,6 @@ name = "ort-sys"
6695 6614 version = "2.0.0-rc.14"
6696 6615 source = "registry+https://github.com/rust-lang/crates.io-index"
6697 6616 checksum = "4af4763e553f916650b0bfe4b8d217d61c28607f6117e48b8ab5584d1138f22f"
6698 dependencies = [
6699 "hmac-sha256",
6700 "lzma-rust2",
6701 "ureq",
6702 ]
6703 6617
6704 6618 [[package]]
6705 6619 name = "pango"
@@ -6808,15 +6722,6 @@ version = "0.1.2"
6808 6722 source = "registry+https://github.com/rust-lang/crates.io-index"
6809 6723 checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
6810 6724
6811 [[package]]
6812 name = "pem-rfc7468"
6813 version = "1.0.0"
6814 source = "registry+https://github.com/rust-lang/crates.io-index"
6815 checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9"
6816 dependencies = [
6817 "base64ct",
6818 ]
6819
6820 6725 [[package]]
6821 6726 name = "percent-encoding"
6822 6727 version = "2.3.2"
@@ -8779,17 +8684,6 @@ dependencies = [
8779 8684 "windows-sys 0.61.2",
8780 8685 ]
8781 8686
8782 [[package]]
8783 name = "socks"
8784 version = "0.3.4"
8785 source = "registry+https://github.com/rust-lang/crates.io-index"
8786 checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"
8787 dependencies = [
8788 "byteorder",
8789 "libc",
8790 "winapi",
8791 ]
8792
8793 8687 [[package]]
8794 8688 name = "spin"
8795 8689 version = "0.9.9"
@@ -10161,36 +10055,6 @@ version = "0.9.0"
10161 10055 source = "registry+https://github.com/rust-lang/crates.io-index"
10162 10056 checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
10163 10057
10164 [[package]]
10165 name = "ureq"
10166 version = "3.4.2"
10167 source = "registry+https://github.com/rust-lang/crates.io-index"
10168 checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc"
10169 dependencies = [
10170 "base64 0.23.1",
10171 "der",
10172 "log",
10173 "native-tls",
10174 "percent-encoding",
10175 "rustls-pki-types",
10176 "socks",
10177 "ureq-proto",
10178 "utf8-zero",
10179 "webpki-root-certs",
10180 ]
10181
10182 [[package]]
10183 name = "ureq-proto"
10184 version = "0.6.4"
10185 source = "registry+https://github.com/rust-lang/crates.io-index"
10186 checksum = "f86fd172ccca569e458f61b6bdd6220965a9ef36e672a6852953b51a0e1583be"
10187 dependencies = [
10188 "base64 0.23.1",
10189 "http",
10190 "httparse",
10191 "log",
10192 ]
10193
10194 10058 [[package]]
10195 10059 name = "url"
10196 10060 version = "2.5.8"
@@ -10263,12 +10127,6 @@ version = "0.7.6"
10263 10127 source = "registry+https://github.com/rust-lang/crates.io-index"
10264 10128 checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
10265 10129
10266 [[package]]
10267 name = "utf8-zero"
10268 version = "0.8.1"
10269 source = "registry+https://github.com/rust-lang/crates.io-index"
10270 checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e"
10271
10272 10130 [[package]]
10273 10131 name = "utf8_iter"
10274 10132 version = "1.0.4"
@@ -870,12 +870,6 @@ version = "0.23.1"
870source = "registry+https://github.com/rust-lang/crates.io-index"
870source = "registry+https://github.com/rust-lang/crates.io-index"
871checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
871checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
872
872
873[[package]]
874name = "base64ct"
875version = "1.8.3"
876source = "registry+https://github.com/rust-lang/crates.io-index"
877checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
878
879[[package]]
873[[package]]
880name = "bindgen"
874name = "bindgen"
881version = "0.65.1"
875version = "0.65.1"
@@ -2189,16 +2183,6 @@ dependencies = [
2189 "tract-pulse",
2183 "tract-pulse",
2190]
2184]
2191
2185
2192[[package]]
2193name = "der"
2194version = "0.8.2"
2195source = "registry+https://github.com/rust-lang/crates.io-index"
2196checksum = "a878c850e9e421b20262e9b41f9c860e4785fa07541c266b62ff9d1ef998a80a"
2197dependencies = [
2198 "pem-rfc7468",
2199 "zeroize",
2200]
2201
2202[[package]]
2186[[package]]
2203name = "deranged"
2187name = "deranged"
2204version = "0.5.8"
2188version = "0.5.8"
@@ -4091,6 +4075,8 @@ dependencies = [
4091[[package]]
4075[[package]]
4092name = "gpui-pre-windows"
4076name = "gpui-pre-windows"
4093version = "0.3.8"
4077version = "0.3.8"
4078source = "registry+https://github.com/rust-lang/crates.io-index"
4079checksum = "371f9bb13f97e3bea2f8b8e5e81232bb74d735153c244ae67f7400e743925b1c"
4094dependencies = [
4080dependencies = [
4095 "accesskit",
4081 "accesskit",
4096 "accesskit_windows",
4082 "accesskit_windows",
@@ -4375,12 +4361,6 @@ dependencies = [
4375 "digest 0.10.7",
4361 "digest 0.10.7",
4376]
4362]
4377
4363
4378[[package]]
4379name = "hmac-sha256"
4380version = "1.1.15"
4381source = "registry+https://github.com/rust-lang/crates.io-index"
4382checksum = "1ad320b3b96fb2a455a0726d16efe0a5afdbd34b71dea5bc53b05ea057714d4e"
4383
4384[[package]]
4364[[package]]
4385name = "home"
4365name = "home"
4386version = "0.5.12"
4366version = "0.5.12"
@@ -5377,12 +5357,6 @@ dependencies = [
5377 "num-traits",
5357 "num-traits",
5378]
5358]
5379
5359
5380[[package]]
5381name = "lzma-rust2"
5382version = "0.15.8"
5383source = "registry+https://github.com/rust-lang/crates.io-index"
5384checksum = "e20f57f9918e5bd7bc58c22cdd70a6afc7375d4dd9683af5f2b34bd3d2bba619"
5385
5386[[package]]
5360[[package]]
5387name = "mac"
5361name = "mac"
5388version = "0.1.1"
5362version = "0.1.1"
@@ -5742,23 +5716,6 @@ dependencies = [
5742 "getrandom 0.2.17",
5716 "getrandom 0.2.17",
5743]
5717]
5744
5718
5745[[package]]
5746name = "native-tls"
5747version = "0.2.18"
5748source = "registry+https://github.com/rust-lang/crates.io-index"
5749checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
5750dependencies = [
5751 "libc",
5752 "log",
5753 "openssl",
5754 "openssl-probe",
5755 "openssl-sys",
5756 "schannel",
5757 "security-framework",
5758 "security-framework-sys",
5759 "tempfile",
5760]
5761
5762[[package]]
5719[[package]]
5763name = "ndarray"
5720name = "ndarray"
5764version = "0.17.2"
5721version = "0.17.2"
@@ -6598,49 +6555,12 @@ dependencies = [
6598 "libc",
6555 "libc",
6599]
6556]
6600
6557
6601[[package]]
6602name = "openssl"
6603version = "0.10.81"
6604source = "registry+https://github.com/rust-lang/crates.io-index"
6605checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
6606dependencies = [
6607 "bitflags 2.13.2",
6608 "cfg-if 1.0.5",
6609 "foreign-types 0.3.2",
6610 "libc",
6611 "openssl-macros",
6612 "openssl-sys",
6613]
6614
6615[[package]]
6616name = "openssl-macros"
6617version = "0.1.1"
6618source = "registry+https://github.com/rust-lang/crates.io-index"
6619checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
6620dependencies = [
6621 "proc-macro2",
6622 "quote",
6623 "syn 2.0.119",
6624]
6625
6626[[package]]
6558[[package]]
6627name = "openssl-probe"
6559name = "openssl-probe"
6628version = "0.2.1"
6560version = "0.2.1"
6629source = "registry+https://github.com/rust-lang/crates.io-index"
6561source = "registry+https://github.com/rust-lang/crates.io-index"
6630checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
6562checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
6631
6563
6632[[package]]
6633name = "openssl-sys"
6634version = "0.9.117"
6635source = "registry+https://github.com/rust-lang/crates.io-index"
6636checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
6637dependencies = [
6638 "cc",
6639 "libc",
6640 "pkg-config",
6641 "vcpkg",
6642]
6643
6644[[package]]
6564[[package]]
6645name = "option-ext"
6565name = "option-ext"
6646version = "0.2.0"
6566version = "0.2.0"
@@ -6687,7 +6607,6 @@ dependencies = [
6687 "ort-sys",
6607 "ort-sys",
6688 "smallvec",
6608 "smallvec",
6689 "tracing",
6609 "tracing",
6690 "ureq",
6691]
6610]
6692
6611
6693[[package]]
6612[[package]]
@@ -6695,11 +6614,6 @@ name = "ort-sys"
6695version = "2.0.0-rc.14"
6614version = "2.0.0-rc.14"
6696source = "registry+https://github.com/rust-lang/crates.io-index"
6615source = "registry+https://github.com/rust-lang/crates.io-index"
6697checksum = "4af4763e553f916650b0bfe4b8d217d61c28607f6117e48b8ab5584d1138f22f"
6616checksum = "4af4763e553f916650b0bfe4b8d217d61c28607f6117e48b8ab5584d1138f22f"
6698dependencies = [
6699 "hmac-sha256",
6700 "lzma-rust2",
6701 "ureq",
6702]
6703
6617
6704[[package]]
6618[[package]]
6705name = "pango"
6619name = "pango"
@@ -6808,15 +6722,6 @@ version = "0.1.2"
6808source = "registry+https://github.com/rust-lang/crates.io-index"
6722source = "registry+https://github.com/rust-lang/crates.io-index"
6809checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
6723checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
6810
6724
6811[[package]]
6812name = "pem-rfc7468"
6813version = "1.0.0"
6814source = "registry+https://github.com/rust-lang/crates.io-index"
6815checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9"
6816dependencies = [
6817 "base64ct",
6818]
6819
6820[[package]]
6725[[package]]
6821name = "percent-encoding"
6726name = "percent-encoding"
6822version = "2.3.2"
6727version = "2.3.2"
@@ -8779,17 +8684,6 @@ dependencies = [
8779 "windows-sys 0.61.2",
8684 "windows-sys 0.61.2",
8780]
8685]
8781
8686
8782[[package]]
8783name = "socks"
8784version = "0.3.4"
8785source = "registry+https://github.com/rust-lang/crates.io-index"
8786checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b"
8787dependencies = [
8788 "byteorder",
8789 "libc",
8790 "winapi",
8791]
8792
8793[[package]]
8687[[package]]
8794name = "spin"
8688name = "spin"
8795version = "0.9.9"
8689version = "0.9.9"
@@ -10161,36 +10055,6 @@ version = "0.9.0"
10161source = "registry+https://github.com/rust-lang/crates.io-index"
10055source = "registry+https://github.com/rust-lang/crates.io-index"
10162checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
10056checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
10163
10057
10164[[package]]
10165name = "ureq"
10166version = "3.4.2"
10167source = "registry+https://github.com/rust-lang/crates.io-index"
10168checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc"
10169dependencies = [
10170 "base64 0.23.1",
10171 "der",
10172 "log",
10173 "native-tls",
10174 "percent-encoding",
10175 "rustls-pki-types",
10176 "socks",
10177 "ureq-proto",
10178 "utf8-zero",
10179 "webpki-root-certs",
10180]
10181
10182[[package]]
10183name = "ureq-proto"
10184version = "0.6.4"
10185source = "registry+https://github.com/rust-lang/crates.io-index"
10186checksum = "f86fd172ccca569e458f61b6bdd6220965a9ef36e672a6852953b51a0e1583be"
10187dependencies = [
10188 "base64 0.23.1",
10189 "http",
10190 "httparse",
10191 "log",
10192]
10193
10194[[package]]
10058[[package]]
10195name = "url"
10059name = "url"
10196version = "2.5.8"
10060version = "2.5.8"
@@ -10263,12 +10127,6 @@ version = "0.7.6"
10263source = "registry+https://github.com/rust-lang/crates.io-index"
10127source = "registry+https://github.com/rust-lang/crates.io-index"
10264checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
10128checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
10265
10129
10266[[package]]
10267name = "utf8-zero"
10268version = "0.8.1"
10269source = "registry+https://github.com/rust-lang/crates.io-index"
10270checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e"
10271
10272[[package]]
10130[[package]]
10273name = "utf8_iter"
10131name = "utf8_iter"
10274version = "1.0.4"
10132version = "1.0.4"
crates/calling/Cargo.toml +1 −1
@@ -28,7 +28,7 @@ tokio.workspace = true
28 28 uuid.workspace = true
29 29
30 30 [target.'cfg(not(windows))'.dependencies]
31 ort = "=2.0.0-rc.14"
31 ort = { version = "=2.0.0-rc.14", default-features = false, features = ["std", "ndarray", "load-dynamic", "api-31"] }
32 32
33 33 [target.'cfg(windows)'.dependencies]
34 34 ort = { version = "=2.0.0-rc.14", default-features = false, features = ["std", "ndarray", "load-dynamic", "api-31", "directml"] }
@@ -28,7 +28,7 @@ tokio.workspace = true
28uuid.workspace = true
28uuid.workspace = true
29
29
30[target.'cfg(not(windows))'.dependencies]
30[target.'cfg(not(windows))'.dependencies]
31ort = "=2.0.0-rc.14"
31ort = { version = "=2.0.0-rc.14", default-features = false, features = ["std", "ndarray", "load-dynamic", "api-31"] }
32
32
33[target.'cfg(windows)'.dependencies]
33[target.'cfg(windows)'.dependencies]
34ort = { version = "=2.0.0-rc.14", default-features = false, features = ["std", "ndarray", "load-dynamic", "api-31", "directml"] }
34ort = { version = "=2.0.0-rc.14", default-features = false, features = ["std", "ndarray", "load-dynamic", "api-31", "directml"] }
crates/calling/src/segmentation/mod.rs +2 −1
@@ -246,7 +246,8 @@ mod tests {
246 246
247 247 #[test]
248 248 fn every_ladder_model_runs_and_answers_one_value_per_cell() {
249 for spec in [MEDIAPIPE, MODNET_SMALL] {
249 let onnx_specs = if runtime::environment().is_some() { vec![MEDIAPIPE, MODNET_SMALL] } else { Vec::new() };
250 for spec in onnx_specs {
250 251 let mut runner = runtime::runner(&spec, Device::Cpu { threads: 2 }).expect("model loads");
251 252 let output = runner.run(spec.input(&mut frame())).expect("inference runs");
252 253 assert!(spec.mask(&output).is_some(), "{}", spec.name);
@@ -246,7 +246,8 @@ mod tests {
246
246
247 #[test]
247 #[test]
248 fn every_ladder_model_runs_and_answers_one_value_per_cell() {
248 fn every_ladder_model_runs_and_answers_one_value_per_cell() {
249 for spec in [MEDIAPIPE, MODNET_SMALL] {
249 let onnx_specs = if runtime::environment().is_some() { vec![MEDIAPIPE, MODNET_SMALL] } else { Vec::new() };
250 for spec in onnx_specs {
250 let mut runner = runtime::runner(&spec, Device::Cpu { threads: 2 }).expect("model loads");
251 let mut runner = runtime::runner(&spec, Device::Cpu { threads: 2 }).expect("model loads");
251 let output = runner.run(spec.input(&mut frame())).expect("inference runs");
252 let output = runner.run(spec.input(&mut frame())).expect("inference runs");
252 assert!(spec.mask(&output).is_some(), "{}", spec.name);
253 assert!(spec.mask(&output).is_some(), "{}", spec.name);
crates/calling/src/segmentation/runtime.rs +5 −1
@@ -27,9 +27,13 @@ pub fn environment() -> Option<&'static Environment> {
27 27 ENVIRONMENT.get_or_init(|| builder().and_then(|builder| builder.with_name("segmentation").build().ok())).as_ref()
28 28 }
29 29
30 #[cfg(not(windows))]
31 const SYSTEM_ONNXRUNTIME: &str = "libonnxruntime.so";
32
30 33 #[cfg(not(windows))]
31 34 fn builder() -> Option<ort::environment::EnvironmentBuilder> {
32 Some(ort::init())
35 let path = std::env::var_os("ORT_DYLIB_PATH").unwrap_or_else(|| SYSTEM_ONNXRUNTIME.into());
36 ort::init_from(path).ok()
33 37 }
34 38
35 39 #[cfg(windows)]
@@ -27,9 +27,13 @@ pub fn environment() -> Option<&'static Environment> {
27 ENVIRONMENT.get_or_init(|| builder().and_then(|builder| builder.with_name("segmentation").build().ok())).as_ref()
27 ENVIRONMENT.get_or_init(|| builder().and_then(|builder| builder.with_name("segmentation").build().ok())).as_ref()
28}
28}
29
29
30#[cfg(not(windows))]
31const SYSTEM_ONNXRUNTIME: &str = "libonnxruntime.so";
32
30#[cfg(not(windows))]
33#[cfg(not(windows))]
31fn builder() -> Option<ort::environment::EnvironmentBuilder> {
34fn builder() -> Option<ort::environment::EnvironmentBuilder> {
32 Some(ort::init())
35 let path = std::env::var_os("ORT_DYLIB_PATH").unwrap_or_else(|| SYSTEM_ONNXRUNTIME.into());
36 ort::init_from(path).ok()
33}
37}
34
38
35#[cfg(windows)]
39#[cfg(windows)]