Starlings.Runtime.OnnxWeb
0.5.0
dotnet add package Starlings.Runtime.OnnxWeb --version 0.5.0
NuGet\Install-Package Starlings.Runtime.OnnxWeb -Version 0.5.0
<PackageReference Include="Starlings.Runtime.OnnxWeb" Version="0.5.0" />
<PackageVersion Include="Starlings.Runtime.OnnxWeb" Version="0.5.0" />
<PackageReference Include="Starlings.Runtime.OnnxWeb" />
paket add Starlings.Runtime.OnnxWeb --version 0.5.0
#r "nuget: Starlings.Runtime.OnnxWeb, 0.5.0"
#:package Starlings.Runtime.OnnxWeb@0.5.0
#addin nuget:?package=Starlings.Runtime.OnnxWeb&version=0.5.0
#tool nuget:?package=Starlings.Runtime.OnnxWeb&version=0.5.0
Starlings.Runtime.OnnxWeb
onnxruntime-web 1.30.0 for Starlings models in .NET browser-wasm apps (Blazor WebAssembly). It's the browser counterpart of Starlings.Runtime.Onnx: model download with SHA-256 verification and Cache Storage, session creation with no silent provider fallback, and asynchronous runs from C# through [JSImport]. Model bytes stay in JavaScript and never enter the .NET heap. The package ships onnxruntime-web's WASM-only bundle as static web assets under _content/Starlings.Runtime.OnnxWeb/ort/ (14.2 MB, about 2.3 MB brotli). WebGPU is the separate, opt-in Starlings.Runtime.OnnxWeb.WebGpu. The API may still change.
Maturity
Maturity is per profile, generated from the registry manifests by model-pipeline catalog (do not edit this table by hand). Gates, evidence and capabilities per profile: the model catalog.
| Profile | Maturity | Platforms |
|---|---|---|
multilingual-e5-small/onnx-fp32-wasm |
experimental | linux-x64 wasm chromium-153: experimental; linux-x64 wasm firefox: untested; macos-arm64 wasm safari: untested; windows-x64 wasm chromium: untested |
multilingual-e5-small/onnx-fp32-webgpu |
experimental | linux-x64 webgpu chromium-153: experimental; linux-x64 webgpu firefox: untested; macos-arm64 webgpu safari: untested; windows-x64 webgpu chromium: untested |
multilingual-e5-small/onnx-int8embed-wasm |
experimental | linux-x64 wasm chromium-153: experimental; linux-x64 wasm firefox: untested; macos-arm64 wasm safari: untested; windows-x64 wasm chromium: untested |
multilingual-e5-small/onnx-int8embed-webgpu |
experimental | linux-x64 webgpu chromium-153: experimental; linux-x64 webgpu firefox: untested; macos-arm64 webgpu safari: untested; windows-x64 webgpu chromium: untested |
Experimental. WebAssembly has no support badge (plan 13.1). The model profiles that use this runtime are the e5 browser profiles above (the WebGPU ones through Starlings.Runtime.OnnxWeb.WebGpu); their capabilities are in Starlings.Models.E5.Browser. G1 and G2 pass in Chrome for Testing 153 on Linux x64 (docs/evidence/browser-e5-package-2026-10-23/gates/); other browsers and operating systems are untested.
Use
[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")]
var info = await OnnxWebRuntime.InitializeAsync(); // once per page; NumThreads, Proxy, Bundle are options
using var model = await OnnxWebAssets.FetchAsync(url, expectedSha256, progress: progress);
await using var session = await OnnxWebSession.CreateAsync(model); // consumes the bytes
var hidden = new float[rows * width * 384];
int[] shape = await session.RunAsync(
[OnnxWebInput.FromInt64("input_ids", ids, rows, width), OnnxWebInput.FromInt64("attention_mask", mask, rows, width)],
"last_hidden_state", hidden);
- Inputs and outputs. Inputs are int64 or float32, and outputs are copied as float32 into a destination of exactly the output's size. Runs on one session are serialized.
- Cancellation. It's checked before a run starts; onnxruntime-web cannot interrupt one in progress.
- Threads. More than one needs a cross-origin isolated page (COOP
same-origin, COEPrequire-corporcredentialless);OnnxWebRuntimeInforeports what's in effect. - Proxy worker.
Proxy = trueruns the WASM backend in onnxruntime-web's worker, so the page never blocks during inference. It's experimental and WASM-only. - Threading model. It supports the default single-threaded .NET browser runtime, not
WasmEnableThreads. - Hosts.
- On a page (Blazor WebAssembly, or any .NET
browser-wasmapp): experimental, with the conformance evidence of the e5 browser profiles. - In a Web Worker: experimental, from one smoke run (
docs/evidence/browser-e5-package-2026-10-23/js-host/); the worker path has no gate evidence of its own. In a worker, URLs resolve against the worker script's location, so place the worker next to_framework/and_content/, asdotnet.jsrequires anyway.ai-dotnet/samples/E5BrowserJshosts it in a worker behind a JavaScript API.
- On a page (Blazor WebAssembly, or any .NET
Build
The onnxruntime-web files are not in Git. The build runs npm ci in ai-dotnet/src/Shared/OnnxWeb (integrity-checked against package-lock.json) and copies the three files into wwwroot/ort/, which Git ignores. Node.js and npm are needed to build or pack the package; consumers need neither. Notices: ai-dotnet/THIRD-PARTY-NOTICES.md (onnxruntime-web, MIT).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Starlings.Runtime.OnnxWeb:
| Package | Downloads |
|---|---|
|
Starlings.Models.E5.Browser
intfloat/multilingual-e5-small (revision 614241f6) sentence embeddings in the browser (Blazor WebAssembly and other .NET browser-wasm apps) on onnxruntime-web: the owned tokenizer (Starlings.Tokenizers) and the same padding, mean pooling and L2 normalization code as Starlings.Models.E5, async, plus a Microsoft.Extensions.AI IEmbeddingGenerator. Pins the fp32 graph (from the Hub) and the int8-embed variant (host it yourself) by SHA-256. Profiles multilingual-e5-small/onnx-fp32-wasm, onnx-int8embed-wasm (and -webgpu with Starlings.Runtime.OnnxWeb.WebGpu). WebAssembly has no support badge. Maturity is per model profile (Stable, Preview or Experimental): see the README, generated from the model registry. |
|
|
Starlings.Runtime.OnnxWeb.WebGpu
WebGPU for Starlings.Runtime.OnnxWeb: onnxruntime-web 1.30.0's WebGPU-capable bundle as static web assets (26.8 MB binary, about 4 MB brotli) and the OnnxWebGpuBundle to initialize with. WebAssembly has no support badge. Maturity is per model profile (Stable, Preview or Experimental): see the README, generated from the model registry. |
GitHub repositories
This package is not used by any popular GitHub repositories.