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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Starlings.Runtime.OnnxWeb" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Starlings.Runtime.OnnxWeb" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Starlings.Runtime.OnnxWeb" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Starlings.Runtime.OnnxWeb --version 0.5.0
                    
#r "nuget: Starlings.Runtime.OnnxWeb, 0.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Starlings.Runtime.OnnxWeb@0.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Starlings.Runtime.OnnxWeb&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Starlings.Runtime.OnnxWeb&version=0.5.0
                    
Install as a Cake Tool

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, COEP require-corp or credentialless); OnnxWebRuntimeInfo reports what's in effect.
  • Proxy worker. Proxy = true runs 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-wasm app): 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/, as dotnet.js requires anyway. ai-dotnet/samples/E5BrowserJs hosts it in a worker behind a JavaScript API.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
0.5.0 104 11/3/2026
0.4.0 106 11/3/2026