RunicToolkit.Hosting.CsWebUi 0.1.0-preview.30.1

This is a prerelease version of RunicToolkit.Hosting.CsWebUi.
dotnet add package RunicToolkit.Hosting.CsWebUi --version 0.1.0-preview.30.1
                    
NuGet\Install-Package RunicToolkit.Hosting.CsWebUi -Version 0.1.0-preview.30.1
                    
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="RunicToolkit.Hosting.CsWebUi" Version="0.1.0-preview.30.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RunicToolkit.Hosting.CsWebUi" Version="0.1.0-preview.30.1" />
                    
Directory.Packages.props
<PackageReference Include="RunicToolkit.Hosting.CsWebUi" />
                    
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 RunicToolkit.Hosting.CsWebUi --version 0.1.0-preview.30.1
                    
#r "nuget: RunicToolkit.Hosting.CsWebUi, 0.1.0-preview.30.1"
                    
#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 RunicToolkit.Hosting.CsWebUi@0.1.0-preview.30.1
                    
#: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=RunicToolkit.Hosting.CsWebUi&version=0.1.0-preview.30.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=RunicToolkit.Hosting.CsWebUi&version=0.1.0-preview.30.1&prerelease
                    
Install as a Cake Tool

RunicToolkit.Hosting.CsWebUi

This package adapts CS-WebUI to the browser-neutral contracts in RunicToolkit.Hosting.Abstractions. It serves a local frontend directory without ASP.NET Core and supports CS-WebUI's automatic browser selection, an explicitly selected installed browser, or an embedded WebView.

The adapter remains prerelease while its upstream CsWebUi dependency is prerelease.

using CsWebUi;
using RunicToolkit.Hosting.CsWebUi;

var factory = new CsWebUiBrowserHostFactory(
    new CsWebUiAdapterOptions(
        "wwwroot",
        CsWebUiPresentationMode.Auto,
        configureWindow: window =>
        {
            window.Bind("greet", static webEvent =>
                WebUiResult.FromString($"Hello, {webEvent.GetString()}!"));
        }));

Pass factory to WebUiModeRunner. The runner supplies an app:// entry URI; the adapter accepts only the current application host, rejects credentials, ports, queries, fragments, traversal, encoded separators, and control characters, and translates the URI to a relative CS-WebUI root path.

BrowserWindowOptions size and resizability are applied before show. The title is set after CS-WebUI establishes the client connection. The server is kept private to the local machine. A disconnected client raises CloseRequested and completes WaitForCloseAsync.

The native configuration callback runs after WebUiWindow creation and before the window can be shown. It is intended for CS-WebUI Bind/BindAsync registration; do not show or dispose the window from that callback.

CS-WebUI owns process-wide native state, so adapter dispatchers serialize native work across hosts. Disposing a host closes only its owned windows; it does not call the process-wide WebUiApplication.Exit or Clean methods.

Applications that want the shared high-level builder add the separate RunicToolkit.Hosting.CsWebUi.App composition package. Keeping that dependency out of this adapter allows custom hosts to use CS-WebUI without Generic Host.

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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RunicToolkit.Hosting.CsWebUi:

Package Downloads
RunicToolkit.Hosting.CsWebUi.App

High-level WebUiApp composition for native CS-WebUI frontends.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.30.1 67 8/11/2026