Broiler.Graphics 0.1.0-preview.5

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

Broiler.Graphics

CI License: Apache 2.0

Broiler.Graphics is the rendering component for Broiler. It owns a platform-neutral managed core — BBitmap, BCanvas, deterministic CPU rasterization, text and font handling, and the render-list pipeline — plus one presentation backend per platform. Image decoding deliberately lives outside this component: the core depends only on the Broiler.Media.Image abstraction, and the application supplies the concrete codecs.

Native API declarations live in Broiler.Native.Windows, Broiler.Native.Linux, and Broiler.Native.Android. Their package versions are managed centrally in Directory.Packages.props. Publish Native before releasing dependent backends. Explicit uses of native driver descriptions or OpenGL/Vulkan exception types now require their Broiler.Native namespaces.

Preview release. 0.1.0-preview.1 is the first published preview. Public APIs and behaviour are not frozen and may change before 1.0. The Windows backend uses native interop, and the rendering path is fed untrusted image data through codecs the application injects; both deserve explicit review before production or security-sensitive use. Substantial implementation work was AI-assisted, and human-review approval is revision-scoped — consult HUMAN_REVIEW.md for the reviewed revision and conditions before describing a checkout as approved. See the roadmap for what is still open.

Installation

Preview packages need an explicit prerelease opt-in:

dotnet add package Broiler.Graphics --prerelease

Broiler.Graphics is the platform-neutral core and rasterizes on the CPU on its own. Add the backend package for the platform you present on — they are separate packages, and none is pulled in automatically:

dotnet add package Broiler.Graphics.Windows --prerelease

There is no meta-package: an application takes the core plus exactly the backends it presents with.

Consuming Broiler packages from GitHub Packages

NuGet.config maps Broiler.* to the Broiler-Platform GitHub Packages feed and other dependencies to NuGet.org. Local restores need read:packages credentials; CI uses GITHUB_TOKEN with access to the upstream packages. See CI, packages, and releases for setup and publishing.

Packages

Package Target Role
Broiler.Graphics net10.0 Platform-neutral core: bitmaps, canvas, geometry, colour, deterministic CPU raster, text and fonts, render lists. Trimming- and AOT-friendly, fully safe code.
Broiler.Graphics.Windows net10.0 Direct2D/DirectWrite backend, window and input integration, and the HWND-backed video presentation target.
Broiler.Graphics.Linux net10.0 Shared Linux runtime support: native library probing, dependency resolution, runtime diagnostics.
Broiler.Graphics.Linux.OpenGL net10.0 OpenGL/EGL presentation over Mesa/EGL, with pbuffer and opt-in X11 window surfaces.
Broiler.Graphics.Linux.Vulkan net10.0 Vulkan 1.2 loader/device path. Presentation is still CPU-present.
Broiler.Graphics.Android net10.0 EGL / OpenGL ES presentation. Reaches Android through P/Invoke, so it needs no Mono.Android reference and no android workload.
Broiler.Graphics.WebAssembly net10.0 Browser Canvas backend: a platform-neutral frame planner plus JSImport/JSExport interop gated with [SupportedOSPlatform("browser")].

Every package ships XML documentation and a .snupkg symbol package, and is built deterministically with SourceLink.

Dependency direction

Broiler.Graphics.Windows       -> Broiler.Graphics -> Broiler.Media.Image   (abstraction only)
Broiler.Graphics.Windows       -> Broiler.Media.Video                       (declares the HWND video target)
Broiler.Graphics.Linux.OpenGL  -> Broiler.Graphics.Linux -> Broiler.Graphics
Broiler.Graphics.Linux.Vulkan  -> Broiler.Graphics.Linux -> Broiler.Graphics
Broiler.Graphics.Android       -> Broiler.Graphics
Broiler.Graphics.WebAssembly   -> Broiler.Graphics

The core references the image abstraction only, never an implementation. The application composition root supplies the concrete codecs:

BImageCodecs.Use(new MediaCodecCatalog(ManagedImageCodecs.CreateCodecs()));

Backend status

Backend Status
Windows Direct2D The most complete backend: render-list replay, DirectWrite text, window and input integration.
Linux OpenGL Preview. A GPU-native replay slice covers clear, opaque fill/stroke rectangles, and rectangular clips; text, images, rounded rectangles, transforms, and translucent draws fall back to CPU-present rendering, where render lists are replayed through the managed renderer, uploaded to an OpenGL texture/FBO, and presented through an EGL pbuffer or opt-in X11 window surface.
Linux Vulkan Earliest preview. Creates a Vulkan 1.2 loader/device path when available and shares the CPU-present fallback; WSI/swapchain presentation and Vulkan command replay are still being built out.
Android EGL / OpenGL ES presentation surfaces and renderer.
WebAssembly Frame planner validated against a CPU oracle; the browser Canvas interop runs on the browser-wasm runtime.

The Linux demo is the current composition root for graphics plus input. It can open the OpenGL X11 preview window and, with explicit raw-input acknowledgement, wire Linux evdev keyboard/mouse providers while pausing delivery when the X11 window loses focus. It also prints OS/runtime, display-server, OpenGL driver, Vulkan device, and selected evdev-device diagnostics. The roadmap holds the remaining Linux validation and implementation work.

Repository layout

src/                     runtime assemblies, one directory per package
src/tests/               one self-hosted test runner executable per assembly
src/demos/               Windows and Linux demo applications (never packaged)
eng/                     vendored packaging metadata, package icon, test script
docs/                    roadmap
.github/workflows/       CI and publish pipelines
Broiler.Media/           submodule; supplies the image and video abstractions
Broiler.Input/           submodule; keyboard and mouse providers for the Linux demo
Broiler.Graphics.slnx    solution over every project in src/

Cross-component dependencies are git submodules at the repository root, and between them they close the graph — every project reference resolves inside a checkout of this repository.

Broiler.Media supplies Broiler.Media.Image to the core and Broiler.Media.Video to the Windows backend, and its managed codecs act as the composition root for the test runners. Broiler.Input supplies the evdev keyboard and mouse providers, and only the Linux demo references it — no package depends on it.

Broiler.Media in turn declares Broiler.Graphics as a submodule of its own, but only its -Windows configuration needs it. Initialise one level, as below, and the cycle stops.

Building and testing

The repository uses package dependencies and requires no submodules. Build the neutral projects, then run the suites for the current host:

dotnet build Broiler.Graphics.slnx -c Release
bash ./eng/run-tests.sh Release

The script runs the core, WebAssembly, and Android suites, and explicitly builds and runs the Windows or Linux suite. Projects use Debug or Release; platform providers and demos can also be built directly by project path.

Demos

dotnet run --project src/demos/Broiler.Graphics.Windows.Demo -c Debug
dotnet run --project src/demos/Broiler.Graphics.Linux.Demo -c Debug

The Linux demo takes options after --: --vulkan selects the Vulkan path, --window --enable-evdev-input --interactive opens the X11 preview window and wires evdev input, and --artifact-dir=<path> writes the diagnostics artifacts somewhere specific.

dotnet run --project src/demos/Broiler.Graphics.Linux.Demo -c Debug -- --window --enable-evdev-input --interactive

Packaging and releases

pwsh -File eng/pack.ps1

This packs and verifies all seven packages, including providers excluded from normal solution builds. CI tests on Linux and Windows; Publish reuses CI and publishes its verified artifacts. Manual runs default to a dry run and select the next unused preview. See CI, packages, and releases for feed credentials, dependency versions, tags, and NuGet.org publishing.

Preview status

This is first-preview software, and the security and stability warnings recorded in HUMAN_REVIEW.md apply to any published preview:

  • The component is preview software and is neither fully optimized nor final.
  • Public APIs and behaviour may change while the global refactoring continues.
  • Image decoding is injected from Broiler.Media, parses complex binary input, and must be treated as security-sensitive. Do not decode untrusted input in security-sensitive environments without sandboxing, resource limits, fuzzing, and additional review.
  • The Windows backend uses native Windows APIs and Direct2D/DirectWrite/DXGI/D3D interop. Correct and security-relevant usage of every involved API is not guaranteed by a first-preview review.
  • No dedicated fuzzing campaign, SAST report, dependency scan, or independent security audit is recorded. This review is not a production security audit.

Broiler.Graphics is an independent Broiler component. It is not part of, maintained by, or endorsed by HTML Renderer or Yantra JS.

Documentation

License

Broiler.Graphics is licensed under the Apache License 2.0. Third-party material, if present, retains the license identified with that material. The license provides the software on an "AS IS" basis, without warranties or conditions.

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.

NuGet packages (72)

Showing the top 5 NuGet packages that depend on Broiler.Graphics:

Package Downloads
Broiler.UI

Platform-neutral Broiler retained-mode UI root contracts.

Broiler.UI.Standard

Shared platform-neutral retained-mode UI infrastructure for Broiler standard controls.

Broiler.Layout

CSS box-model and layout engine over the canonical Broiler DOM and computed style, independent of any graphics backend.

Broiler.UI.Button

Platform-neutral Broiler button abstraction.

Broiler.UI.Window

Platform-neutral Broiler logical window abstraction.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.12 0 10/11/2026
0.1.0-preview.11 162 10/8/2026
0.1.0-preview.10 151 10/8/2026
0.1.0-preview.9 410 10/8/2026
0.1.0-preview.8 567 10/7/2026
0.1.0-preview.7 5,092 9/28/2026
0.1.0-preview.6 343 9/24/2026
0.1.0-preview.5 4,283 9/22/2026