RecursiveAI.OnePlatform 1.0.0

Prefix Reserved
dotnet add package RecursiveAI.OnePlatform --version 1.0.0
                    
NuGet\Install-Package RecursiveAI.OnePlatform -Version 1.0.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="RecursiveAI.OnePlatform" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RecursiveAI.OnePlatform" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RecursiveAI.OnePlatform" />
                    
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 RecursiveAI.OnePlatform --version 1.0.0
                    
#r "nuget: RecursiveAI.OnePlatform, 1.0.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 RecursiveAI.OnePlatform@1.0.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=RecursiveAI.OnePlatform&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RecursiveAI.OnePlatform&version=1.0.0
                    
Install as a Cake Tool

RecursiveAI.OnePlatform

Windows, input, IME, clipboard, DPI, displays, gamepads and the desktop shell for .NET applications on Windows, macOS, Linux (Wayland and X11), Android, iOS and the browser. It depends only on the .NET base class library, and is NativeAOT- and trim-compatible.

  • One PlatformApp per process owns the windows, the event queue and the input state.
  • Each operating system's own API is used directly: Win32, the Objective-C runtime for Cocoa and UIKit, Xlib and the Wayland client protocol on Linux, the NDK on Android, and a small script in the browser.
  • Desktop windows are decorated, movable and resizable by default, and can be dialogs, always-on-top overlays or popups.
  • Desktop services sit beside the windows: a D-Bus client and the Linux portals, the Windows and macOS equivalents (tray icon, notifications, file dialogs, global hotkeys, menu bar, screenshots, single-instance hand-over), and a window accessibility provider that is bridged to UI Automation on Windows and NSAccessibility on macOS.
  • A headless backend and InputInjector drive an app with no display, so tests can click, type and resize without a window.
  • Game controllers, haptics, input actions with rebinding, and text clipboard access are included.

Support

Windows macOS Linux Android, iOS Browser
Windows Win32: ordinary windows, dialogs, overlays, popups, size limits, fullscreen Cocoa: ordinary windows, dialogs, overlays, popups, size limits, fullscreen Wayland (xdg-decoration, wlr-layer-shell, xdg_popup) and X11 (EWMH) one window per activity or scene one canvas
Input keyboard, mouse, touch, gamepads (XInput) keyboard, mouse, trackpad, gamepads keyboard, mouse, touch, gamepads (evdev) touch, keyboard, gamepads keyboard, mouse, touch, Gamepad API
IME WM_IME_* NSTextInputClient text-input-v3 on Wayland; composed keys on X11 system soft keyboard page text input
Clipboard (UTF-8 text) yes yes yes (X11 primary selection too) yes yes
DPI and displays per-monitor v2 backing scale wp_fractional_scale, wp_viewporter, X11 scale system scale devicePixelRatio
Shell services WindowsDesktop: tray icon, notifications, file dialogs, global hotkeys, menu bar, screenshots; LocalSingleInstance MacDesktop: menu bar, status item, file panels, notifications, hotkeys; LocalSingleInstance portals and notification, tray and single-instance services over D-Bus none none
D-Bus and portals n/a n/a DBusConnection, FileChooserPortal, ScreenshotPortal, GlobalShortcutsSession, NotificationService, TrayIcon, SingleInstance n/a n/a
Accessibility UI Automation provider NSAccessibility provider provider model only provider model only provider model only
Injection and capture InputInjector; window and region capture InputInjector InputInjector; screenshot portal InputInjector InputInjector

"Provider model only" means Window.Accessibility keeps the provider and nothing reads it on that system (WindowAccessibility.IsSupported is false). The headless backend works everywhere and has no operating-system window.

Getting started

using OnePlatform;

using var app = PlatformApp.Create();                       // picks Wayland, X11, Win32, Cocoa... for this system
var window = app.CreateWindow(new WindowOptions { Title = "Hello", Width = 800, Height = 600 });

var running = true;
while (running)
{
    app.PumpEvents(1000);                                    // sleeps until an event arrives or a second passes
    while (app.TryGetEvent(out var e))
    {
        if (e.Kind == PlatformEventKind.QuitRequested || e.Kind == PlatformEventKind.WindowCloseRequested)
        {
            running = false;
        }
    }
}

window.NativeHandle gives the native window or view for a renderer, window.Width/Height are physical pixels and window.Scale converts to logical units. For tests, create the app with Backend = PlatformBackendKind.Headless and drive it with app.Injector.

Browser

On browser-wasm the platform's page script, oneplatform.js, comes with the package: it is a static web asset, so a .NET WebAssembly app that references RecursiveAI.OnePlatform publishes it at _content/RecursiveAI.OnePlatform/oneplatform.js with nothing to copy. The app's page imports it and registers it under the module name oneplatform before the program starts; the window is the <canvas> whose id is PlatformOptions.DisplayName (default oneplatform-canvas).

import { dotnet } from './_framework/dotnet.js';
import * as platform from './_content/RecursiveAI.OnePlatform/oneplatform.js';

const runtime = await dotnet.create();
runtime.setModuleImports('oneplatform', platform);
await runtime.runMain();

See Browser pages for the canvas, the page functions and development control.

Documentation

Source and issues: https://github.com/recursive-ai-oss/oneplatform-csharp

Licensed under MIT OR Apache-2.0.

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 (1)

Showing the top 1 NuGet packages that depend on RecursiveAI.OnePlatform:

Package Downloads
RecursiveAI.OneApp

Desktop app framework for .NET with an HTML and CSS UI: markup components or HTML pages laid out and painted by OneRender, drawn on the GPU in a native window, redrawn only when something changes. Multiple windows, menus, tray, notifications, dialogs, accessibility bridges and a local harness for driving apps in tests.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 12/2/2026

See CHANGELOG.md in the repository.