Skip to main content
Any Framework

A source generator that generates bindings for libwayland

Published
Aug 12, 2024
2y ago
Total Downloads
517
517

Install

dotnet add package Wayland.SourceGenerator --version 0.0.2

No framework information available.

README

Wayland.SourceGenerator

A source generator that generates bindings for libwayland

Introduction

This source generator generates bindings for libwayland for writing native wayland clients in C#. For further documentation of wayland protocols, see https://wayland.app/.

Usage

Either install the NuGet package Wayland.SourceGenerator or clone the git repository and add a project reference to the source generator in your .csproj:

<ItemGroup>
    <ProjectReference Include="./Wayland.SourceGenerator/Wayland.SourceGenerator/Wayland.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

Then add the xml definitions as AdditionalFiles to your project:

<ItemGroup>
    <AdditionalFiles Include="WaylandXml/*.xml" />
</ItemGroup>

Now you can connect to the wayland socket with

WlDisplay display = WlDisplay.Connect();

and start writing your client.

Make sure that all dependencies of a protocol are also included, e.g. xdg_shell needs the core wayland protocol as it uses the wl_seat type.

Duplicate protocols with the same name e.g. when cloning the wayland-protocols repository, wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml and wayland-protocols/stable/xdg-shell/xdg-shell.xml are in conflict.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.