Skip to content

dimohy/Duxel

Repository files navigation

Duxel

Duxel logo

Immediate-mode GUI framework for .NET 8, .NET 9, and .NET 10, using a Vulkan renderer with a Windows-native platform backend.

Current published package version: 0.2.12-preview

Supported package targets: net8.0, net9.0, net10.0. The file-based app (FBA) workflow still requires the .NET 10 SDK.

NuGet License: MIT

What it provides

  • Immediate-mode widget API (UiImmediateContext) with UiScreen.Render(...) lifecycle.
  • Vulkan backend with profile-based defaults (Display / Render) and configurable MSAA.
  • Windows-native window/input backend (keyboard, mouse, wheel, IME, clipboard).
  • Windows 11-style extended title bars with application tabs, native caption behavior, Snap Layout, system menus, DPI, and multi-monitor support.
  • NativeAOT-friendly runtime patterns.
  • UI DSL (.ui) parser/runtime and source-generator path.

Packages

Package Purpose
Duxel.App Core app facade and shared runtime pipeline
Duxel.Windows.App Windows platform runner package (DuxelWindowsApp.Run)

For a regular .NET 8 Windows application, target net8.0-windows7.0 (or a later Windows TFM). Duxel package assemblies provide portable net8.0 assets, while the Windows TFM makes the platform requirement explicit to analyzers and consumers. FBA samples continue to use net10.0 because file-based apps require the .NET 10 SDK.

Quick start (FBA, Windows)

Create hello.cs:

#:property TargetFramework=net10.0
#:property platform=windows
#:package Duxel.$(platform).App@*-*

using Duxel.App;
using Duxel.Core;
using Duxel.Windows.App;

DuxelWindowsApp.Run(new DuxelAppOptions
{
    Window = new DuxelWindowOptions { Title = "Hello Duxel" },
    Screen = new HelloScreen()
});

public sealed class HelloScreen : UiScreen
{
    public override void Render(UiImmediateContext ui)
    {
        ui.BeginWindow("Hello");
        ui.Text("Hello, Duxel!");
        ui.EndWindow();
    }
}

Run:

dotnet run hello.cs

Featured FBA showcase

If you want to see Duxel beyond a hello-world window, start with these representative FBA samples:

  • samples/fba/all_features.cs — the broad widget gallery with typography, layout, popup/context, input diagnostics, item state, multi-select, layers, drawing, image, and markdown showcase windows, now opening Markdown Studio on first launch instead of a blank surface.
  • samples/fba/ui_mixed_stress.cs — a balanced multi-window showcase that fills the screen with controls, forms, long lists, data tables, text rendering, and a dense canvas stress area.
  • samples/fba/Duxel_perf_test_fba.cs — a polygon stress-test sample with live controls for VSync, MSAA, cache toggles, polygon settings, and profile-oriented renderer checks.

Samples

  • Project sample: samples/Duxel.Sample
    • dotnet run --project samples/Duxel.Sample/
  • FBA samples: samples/fba/*.cs
    • dotnet run samples/fba/all_features.cs
    • ./run-fba.ps1 samples/fba/all_features.cs (local project reference; NativeAOT by default)
    • all_features.cs now opens Markdown Studio by default and still includes dedicated typography, layout, popup/context, input-query, item-status, multi-select, and layer/animation showcase windows.

DSL

Duxel supports declarative .ui files (indent-based tree) and runtime/state bindings.

Build

dotnet build Duxel.slnx -c Release

License

MIT

About

.NET cross-platform, ImGui-style immediate mode GUI framework, which now uses Vulkan with NativeAOT to produce a very small executable.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages