avalonia-d 0.1.0
D bindings for Avalonia via a C ABI host, with ShadUI (shadcn-inspired) controls
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
ifndef::env-github[:icons: font] :toc: preamble :toclevels: 2 :sectanchors:
ifdef::env-github[] ++++ <a id="readme-top"></a> <div align="center"> <a href="https://github.com/dlang-supplemental/avalonia-d/graphs/contributors"><img src="https://img.shields.io/github/contributors/dlang-supplemental/avalonia-d.svg?style=for-the-badge" alt="Contributors"></a> <a href="https://github.com/dlang-supplemental/avalonia-d/network/members"><img src="https://img.shields.io/github/forks/dlang-supplemental/avalonia-d.svg?style=for-the-badge" alt="Forks"></a> <a href="https://github.com/dlang-supplemental/avalonia-d/stargazers"><img src="https://img.shields.io/github/stars/dlang-supplemental/avalonia-d.svg?style=for-the-badge" alt="Stars"></a> <a href="https://github.com/dlang-supplemental/avalonia-d/issues"><img src="https://img.shields.io/github/issues/dlang-supplemental/avalonia-d.svg?style=for-the-badge" alt="Issues"></a> <a href="https://github.com/dlang-supplemental/avalonia-d/blob/main/LICENSE"><img src="https://img.shields.io/github/license/dlang-supplemental/avalonia-d.svg?style=for-the-badge" alt="License"></a> <br /> <h3 align="center">avalonia-d</h3> <p align="center"> D bindings for <a href="https://avaloniaui.net/">Avalonia</a> via a C ABI host, with <a href="https://github.com/accntech/shad-ui">ShadUI</a> (shadcn-inspired) controls.<br /> <a href="https://dlang-supplemental.github.io/docs/avalonia-d/index.html"><strong>Explore the docs »</strong></a><br /><br /><a href="https://github.com/dlang-supplemental/avalonia-d/issues">Report Bug</a> · <a href="https://github.com/dlang-supplemental/avalonia-d/issues">Request Feature</a> </p> </div> ++++ endif::[]
ifndef::env-github[] image:https://img.shields.io/github/contributors/dlang-supplemental/avalonia-d.svg?style=for-the-badge[Contributors,link=https://github.com/dlang-supplemental/avalonia-d/graphs/contributors] image:https://img.shields.io/github/forks/dlang-supplemental/avalonia-d.svg?style=for-the-badge[Forks,link=https://github.com/dlang-supplemental/avalonia-d/network/members] image:https://img.shields.io/github/stars/dlang-supplemental/avalonia-d.svg?style=for-the-badge[Stars,link=https://github.com/dlang-supplemental/avalonia-d/stargazers] image:https://img.shields.io/github/issues/dlang-supplemental/avalonia-d.svg?style=for-the-badge[Issues,link=https://github.com/dlang-supplemental/avalonia-d/issues] image:https://img.shields.io/github/license/dlang-supplemental/avalonia-d.svg?style=for-the-badge[License,link=https://github.com/dlang-supplemental/avalonia-d/blob/main/LICENSE]
= avalonia-d
D bindings for https://avaloniaui.net/[Avalonia] via a C ABI host, with https://github.com/accntech/shad-ui[ShadUI] (shadcn-inspired) controls.
link:https://dlang-supplemental.github.io/docs/avalonia-d/index.html[Explore the docs »] · link:https://github.com/dlang-supplemental/avalonia-d/issues[Report Bug] endif::[]
No prior D wrapper for Avalonia was found (GitHub / awesome-d / DUB, 2026-08). Avalonia is a .NET UI toolkit, so this package hosts CoreCLR from a small C# library (DNNE native exports) and wraps opaque handles in D.
A from-scratch shadcn clone is unnecessary: https://github.com/accntech/shad-ui[ShadUI] (MIT, NuGet ShadUI, Avalonia 12.1) already covers that ground. This repo consumes it. Fork and refine ShadUI only when a C# control change is required.
Install: dub add avalonia-d (after a SemVer tag is on the registry; pin ~>0.1.0 to stay on 0.1.x).
Build the host locally with powershell -File tools/build-host.ps1, or unpack the avalonia-d-host-win-x64.zip asset from GitHub Releases into native/win-x64/.
== About The Project
++++ <p align="right">(<a href="#readme-top">back to top</a>)</p> ++++
== Requirements
- D compiler (
ldc2ordmd) and https://dub.pm/[dub] - https://dotnet.microsoft.com/download[.NET 9 SDK]
- A C compiler on
PATHfor DNNE (MSVC Build Tools on Windows)
== Installation
=== Build the Avalonia host
[source,powershell]
powershell -File tools/build-host.ps1
This publishes native/win-x64/ (or linux-x64 / osx-arm64) with AvaloniaD.HostNE.dll and the managed Avalonia + ShadUI assemblies it loads.
== Usage
=== Quick start
[source,d]
import avalonia;
void main() {
init(ThemeMode.dark);
auto win = new Window("Hello", 480, 280);
auto col = new Stack();
col.margin(24, 24, 24, 24);
auto btn = new Button("Click me");
btn.onClick({ /* ... */ });
col.add(btn);
win.content = col;
win.run();
}
Examples:
[source,powershell]
powershell -File tools/build-host.ps1 dub run --root examples/hello dub run --root examples/gallery
See also xref-style docs under docs/ in this repository.
++++ <p align="right">(<a href="#readme-top">back to top</a>)</p> ++++
== Built With
- Runtime: D, .NET 9 / CoreCLR
- UI: Avalonia 12.1, ShadUI 0.2.4
- Interop: DNNE native exports, C ABI in
include/avalonia_d.h - Docs: AsciiDoc / Antora (org hub)
== Changelog
See link:CHANGELOG.adoc[CHANGELOG.adoc].
== License
MIT. ShadUI is MIT (Accountech). Avalonia is MIT.
== Contact
DLang Supplemental — [email protected]
Project Link: https://github.com/dlang-supplemental/avalonia-d
Site: https://dlang-supplemental.github.io
- 0.1.0 released 2 days ago
- dlang-supplemental/avalonia-d
- MIT
- Copyright © 2026, amdphreak
- Authors:
- Dependencies:
- none
- Versions:
-
Show all 1 versions0.1.0 2026-Aug-18 - Download Stats:
-
-
2 downloads today
-
2 downloads this week
-
2 downloads this month
-
2 downloads total
-
- Score:
- 0.0
- Short URL:
- avalonia-d.dub.pm