Rask.Native 0.20.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.Native --version 0.20.0
                    
NuGet\Install-Package Rask.Native -Version 0.20.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="Rask.Native" Version="0.20.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Native" Version="0.20.0" />
                    
Directory.Packages.props
<PackageReference Include="Rask.Native" />
                    
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 Rask.Native --version 0.20.0
                    
#r "nuget: Rask.Native, 0.20.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 Rask.Native@0.20.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=Rask.Native&version=0.20.0
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Native&version=0.20.0
                    
Install as a Cake Tool

Rask.Native

Native mobile host for Rask (preview). Ship the same C# component code that runs on the Rask Server and in the browser as a real, store-distributable iOS/Android app. It's a WebView hybrid: your C# runs natively on the device, and the UI renders in a platform WebView driven by Rask's live diff pipeline — the same render → diff → payload path (LiveSessionBase) the Server and WASM hosts use.

The library is transport-agnostic and targets plain net10.0 (no iOS/Android workloads to build/test); the platform WebView lives behind the INativeWebView bridge, implemented per platform in the app head. Includes Rask.Core and the Rask source generators.

Get started

The rask CLI's native template scaffolds both platform heads for you:

dotnet tool install -g Rask.Cli
rask new MyApp --template native
cd MyApp

dotnet workload install ios android          # the iOS/Android SDK workloads (one-time)
dotnet build -t:Run -f net10.0-android       # Android emulator
dotnet build -t:Run -f net10.0-ios           # iOS simulator (macOS + Xcode)

To add the host to an existing app head instead:

dotnet add package Rask.Native

Use

using Rask.Native;

// Native + Local — the app runs in-process on the device (offline, store-distributable).
var host = NativeAppHost.CreateDefault();
// host.Services.AddSingleton<IMyService, MyService>();   // register app services before RunLocalAsync
NativeApp app = await host.RunLocalAsync<App>(webView);   // webView: your INativeWebView

// Native + Server — the WebView is a thin native shell over a remote Rask Server (wss://).
NativeServerShell shell = NativeAppHost.ConnectToServer(new Uri("https://app.example.com/"));

Notes

  • Preview / pre-1.0 — the host + template + iOS/Android heads run end-to-end; APIs may still shift. Native device backends have started landing: the OS share sheet (IShare) has a native UIActivityViewController / Intent.ACTION_SEND head backend (registered before RunLocalAsync, overriding the JS default); native geolocation/push/biometrics follow behind the same seam.
  • WebView hybrid, not a native-control renderer — C# runs native, the view is a WebView (same architecture as MAUI Blazor Hybrid / Capacitor). What it buys over a PWA: App Store / Play Store distribution, native device APIs, and real background execution.
  • Native header / tab / tool bars — compose NativeHeaderBar / NativeTabBar / NativeToolbar as siblings of a NativeWebView and they project to real UINavigationBar/UITabBar (iOS) and platform bars (Android). Style them with type-safe, dark-mode-aware NativeColor (background / tint / title color) per bar or via an app-wide NativeTheme; unset colors keep the platform default.
  • The typed Rask.Core.Browser device wrappers (IGeolocation, IClipboard, IVibration, …) work through the WebView's JS engine with no extra code.

Full documentation: https://github.com/pal-tamas/rask/blob/main/docs/native.md

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.20.1-alpha.0.15 0 8/7/2026
0.20.1-alpha.0.14 0 8/7/2026
0.20.1-alpha.0.13 0 8/7/2026
0.20.1-alpha.0.12 0 8/7/2026
0.20.1-alpha.0.11 0 8/7/2026
0.20.1-alpha.0.9 0 8/7/2026
0.20.1-alpha.0.8 0 8/7/2026
0.20.1-alpha.0.7 0 8/7/2026
0.20.1-alpha.0.5 0 8/7/2026
0.20.1-alpha.0.4 0 8/7/2026
0.20.1-alpha.0.3 0 8/7/2026
0.20.1-alpha.0.2 27 8/6/2026
0.20.0 36 8/6/2026
0.19.1-alpha.0.75 27 8/6/2026
0.19.1-alpha.0.74 27 8/6/2026
0.19.1-alpha.0.73 29 8/6/2026
0.19.1-alpha.0.69 26 8/6/2026
0.19.1-alpha.0.68 31 8/6/2026
0.19.1-alpha.0.67 27 8/6/2026
0.19.1-alpha.0.66 31 8/6/2026
Loading failed