Runtime

GgufRuntime.com Roadmap and Architecture Overview

Report summary

Executive Summary: GgufRuntime.com will serve as the official site and documentation hub for the “C Gguf Runtime Interface” – a UI-centric library built on UAIX.LmRuntime’s local LLM runtime. The UAIX.LmRuntime family is a pure-managed .NET stack for local GGUF/LLaMA inference (no network, no teleme

Status
Research archive item
Category
Runtime
Length
2,749 words
Reading time
13 minutes
Report type
strategy

Key topics

  • Runtime
  • AI
  • UAIX
  • .NET
  • C#
  • TypeScript
  • Python
  • LocalEndpoint

Research provenance

Archive status
Research archive item
Content identity
sha256:12acbdc92360cebe77f57f79f554d01d259e0b5c7f8252da3fb06c0034e8e516

For citation, use the report title and canonical URL. Archival presence does not establish authorship or promote report statements into portfolio evidence.

This page renders the archived Markdown as safe, formatted HTML. It is background research and does not become a portfolio claim without evidence review.

Full report

On this page

Executive Summary: GgufRuntime.com will serve as the official site and documentation hub for the “C# Gguf Runtime Interface” – a UI-centric library built on UAIX.LmRuntime’s local LLM runtime. The UAIX.LmRuntime family is a pure-managed .NET stack for local GGUF/LLaMA inference (no network, no telemetry). We recommend designing the UI library using a cross-platform .NET framework (Avalonia or .NET MAUI) with an MVVM pattern, asynchronous model inference, and clean abstractions. The website should be a custom-themed static documentation site (built with tools like DocFX or Docusaurus) featuring pages for getting started, tutorials, API reference, downloads, examples, and community support. Key technical choices include using modern CSS (no jQuery/Bootstrap), Algolia DocSearch for search, and a CI/CD pipeline (e.g. GitHub Actions). We outline phased milestones, cross-platform testing plans, developer onboarding examples, and success metrics, with tables comparing framework and tooling options and a timeline Gantt chart.

1. Background: UAIX.LmRuntime and GGUF

UAIX.LmRuntime is a public NuGet package family for local .NET LLM inference. It provides managed, in-process execution of GGUF/LLaMA models with no hidden network calls. For example, the LocalEndpoint package is a “high-level local-only GGUF facade” offering verified file intake, isolated inference sessions, and deterministic greedy generation. The stack is layered: core contracts (Abstractions, Tensors), model formats (Gguf), tokenization, sampling, and backends (CPU, CUDA, DirectML, etc.). Notably, UAIX.LmRuntime works on .NET 9 today, with plans for LTS support. The LmRuntime site provides task-oriented docs and API reference (351 types).

Key takeaways: UAIX.LmRuntime is purely managed, CPU-first, and supports loading GGUF model bytes, creating sessions, and generating text locally. It has no built-in model download or provider API – the application must supply the local model with verified metadata (license, SHA256, etc.). The current scope (“Works Today”) includes a .NET library and API docs.

2. UI Architecture and API Surface

Cross-platform framework: For the C# UI layer, we recommend using Avalonia or .NET MAUI. Both support Windows, macOS, iOS, and Android (see Table below). Avalonia (MIT-licensed) is a complete UI toolkit that draws its own interface with Skia, yielding pixel-identical rendering across platforms. It explicitly targets Windows, Linux, macOS, iOS/Android, and even WebAssembly. .NET MAUI (by Microsoft) wraps native controls (WinUI on Windows, UIKit via Mac Catalyst on Mac/iOS, Android SDK) and supports Windows 10+, Android (API 21+), iOS 11+, and macOS 11+. Because MAUI does not natively support Linux, Avalonia may be preferable if broad desktop support is required.

FrameworkPlatformsUI TechProsCons
AvaloniaWin, macOS, Linux, iOS, Android, WASMXAML, SkiaFull cross-platform desktop+mobile; consistent rendering; MVVM/XAML familiar to WPF devs; open-sourceLarger binary (Skia); mobile support still maturing; smaller ecosystem
.NET MAUIWin, macOS (Catalyst), iOS, AndroidXAML, Native UIOfficial Microsoft support; mature tooling; integrates with Visual StudioNo Linux support; abstraction layer can hide platform bugs
Uno PlatformWin, macOS, Linux (via .NET MAUI on Linux with Avalonia), iOS, Android, WebAssemblyXAML (UWP)Broad reach (including Web); WPF/UWP XAML compatibilityComplex setup; less documentation community than MAUI/Avalonia
WPF / WinFormsWindows onlyXAML / WinFormsMature desktop UI (Windows)Windows-only; no cross-platform support

Cross-platform threading: All UI frameworks share a single main thread for rendering. Lengthy inference tasks must run off the UI thread. We strongly advise using C#’s async/await (Task-based async) or background tasks. As Microsoft notes, “Asynchrony is essential for activities that are potentially blocking” on the UI thread. In practice, library methods like GenerateAsync and StreamAsync (shown in UAIX.Abstractions) should be awaited. This ensures the UI stays responsive (users can interact or cancel). Use CancellationToken in all calls so that “Stop” or navigation can cancel inference. If needed, wrap CPU-bound work in Task.Run to parallelize on threadpool threads. Update UI output via the framework’s dispatcher (e.g. Device.BeginInvokeOnMainThread in MAUI) or data-binding notifications.

API design: We propose a high-level API class (e.g. GgufRuntime or LocalEndpointClient) that wraps UAIX.LmRuntime functionality in UI-friendly terms. It might expose:

  • LoadModel(path): load and validate a GGUF file (perhaps showing metadata to user).
  • CreateSession(model, settings): create a new inference session (chat history, token limits).
  • GenerateAsync(request, token): run generation and return a response (with text and finish reason).
  • StreamAsync(request, token): run generation in streaming mode, raising events or IObservable<string> for incremental output.
  • Cancel(): cancel current generation.

All methods should be async and thread-safe. The UI library should emit progress or log events (e.g. weight-loading progress). Consider exposing both synchronous and asynchronous variants, but favor async in docs.

Cross-platform abstractions: Abstract file and settings handling (e.g. use Environment.SpecialFolder or MAUI’s FilePicker for mobile). Use .NET Standard APIs for path separation. For GPU acceleration (Windows/CUDA or DirectML, or Metal on Mac), the UAIX backend packages handle adapter selection; the UI can optionally let users enable GPU if available. Native GPU libraries (CUDA DLLs, Metal runtime) may be required but UAIX abstracts them. Packaging must include any native DLLs under runtimes/ for .NET or through system frameworks.

3. Site Information Architecture and Content Plan

The website will be a developer portal with a logical hierarchy:

  • Home/Landing: Brief overview of Gguf Runtime, links to Getting Started and latest release. Highlights “Local GGUF inference in C#” as the value proposition.
  • Getting Started: Quickstart guide (e.g. console sample) showing how to install the NuGet package, load a model, and generate text.
  • Documentation/Docs: Organized by tasks:
  • Installation (NuGet, .NET requirements).
  • Usage Guide: Loading models (GGUF format), creating sessions, running inference, streaming output.
  • Architecture Overview: High-level diagrams of the runtime layers (citing UAIX).
  • API Reference: Generated class/method reference (auto-generated via DocFX from XML comments).
  • Tutorials/Examples: Step-by-step tutorials (e.g. building a chat app in Avalonia or MAUI, advanced settings like token biasing).
  • Downloads: Links to NuGet packages (or instructions to dotnet add package UAIX.LmRuntime.LocalEndpoint), plus sample model files or datasets (if legally distributable).
  • Examples & Community: Example projects on GitHub, code snippets, forum/Discord link, Q&A, contribution guidelines.
  • Support/Forum: Guidance on filing issues, reporting bugs, contributing. Link to “Submit Ideas” page (similar to LmRuntime’s idea portal).
  • About: Project background, licensing (mention LLaMA model license compliance), author/contact.
  • Search: Add a search box (e.g. Algolia DocSearch) at top-right to search docs and API.

Content types: Use markdown for tutorials and topics, XML comments for API. Enrich pages with code blocks (C# samples) and diagrams (architecture). Ensure a consistent, accessible design. Include a roadmap page (for transparency) and a blog or news section for announcements.

4. Technical Stack

Website Stack

  • Static vs Dynamic: A static site is recommended for simplicity, performance, and security. A static site generator (SSG) will compile docs and content into HTML/CSS/JS.
  • Documentation Generator: DocFX is a strong choice for .NET projects. DocFX can generate API reference from XML comments and supports Markdown for tutorials. It produces a static site (HTML) you can host anywhere. Alternatives include Docusaurus (React-based, widely used) or Hugo/MkDocs. For example, DocFX is C#-native and supports customizing templates, while Docusaurus offers a modern React theme and built-in search integration. A comparison:
ToolTypeNotes
DocFX.NET Static SiteGenerates API ref + Markdown; cross-platform; highly customizable.
DocusaurusReact Static SiteRich UI, versioning, built-in search (Algolia ready) but heavier (Node/React).
HugoGo Static SiteBlazing-fast builds; many themes; works with Markdown; but needs manual API integration.
MkDocsPython Static SiteSimple to use, Material theme; good for docs, but requires plugin for API ref.

Recommendation: DocFX (for tight .NET integration) or Docusaurus (for polished UI). Both work with Algolia DocSearch.

  • Hosting: For static sites, options include:
  • GitHub Pages: Free, directly from a repo branch (supports Jekyll/Docusaurus, limited to static content).
  • Netlify or Vercel: Easy CI/CD deployment, free tier, custom domain, HTTPS, include build pipelines.
  • Azure Static Web Apps: Integrates with GitHub Actions, supports .NET frontends.
  • AWS S3 + CloudFront: Cheap and scalable for static hosting.
OptionTypeProsCons
GitHub PagesStaticFree, GitHub-integrated, CI via actions.Limited build options, no server code.
Netlify/VercelStatic/CDNEasy deploy, custom domains, built-in CI.Free tier limits; need account.
Azure StaticStatic/CDNGood for .NET shops; integrated CI; free tier.Some config overhead.
AWS S3/CloudFrontStatic/CDNScalable, very low cost at scale.More manual setup (IAM, CDN).

We can start with GitHub Pages or Netlify for simplicity.

  • CI/CD: Use GitHub Actions or Azure DevOps to build docs on push (e.g. dotnet tool run docfx, or npm run build for Docusaurus) and deploy to chosen host. For versioned releases, tag commits to generate versioned docs.
  • Search: Integrate Algolia DocSearch (now free for docs sites). DocSearch crawls the static site and provides a hosted search UI. This works seamlessly with static generators like Docusaurus or DocFX. Alternatively, a client-side search like Lunr.js can be used (no external service) but requires building a search index, and less full-featured.
  • Analytics: Include Google Analytics or an open alternative (e.g. Plausible, Matomo) for usage metrics. Ensure privacy compliance.
  • Other Tools: Possibly Markdown linter, Link checker (CI step). Use semantic versions and changelog for releases.

Runtime UI Stack

  • .NET Version: Target the latest LTS (e.g. .NET 8 or 9) to leverage current language features and support. UAIX.LmRuntime is already on .NET 9. Ensure compatibility with .NET MAUI or Avalonia requirements (MAUI uses .NET 7/8).
  • Libraries: UAIX.LmRuntime NuGet packages (LocalEndpoint, Gguf, Tokenization, etc). For the UI layer, possibly package it as its own NuGet (e.g. GgufRuntime.UI), and any UI controls libraries if necessary.
  • Packaging: Distribute the UI API as a NuGet package (with XML docs). If building example apps, package them separately or share source.
  • Build/CI: Use GitHub Actions or Azure Pipelines to build and publish the NuGet package (on tag), run unit tests, and build sample projects for multiple platforms.
  • Platforms:
  • Windows: WinUI 3 or Avalonia UI.
  • Android: .NET MAUI or Avalonia (via Android).
  • macOS: .NET MAUI (Catalyst) or Avalonia (direct).
  • iOS: .NET MAUI (if supported) or skip (Apple support optional per requirement).
  • Linux: Avalonia is recommended (MAUI doesn’t target Linux natively).
  • NuGet Strategy: Follow Semantic Versioning. Provide platform-agnostic package(s) for the core, with any OS-specific dependencies marked as runtime assets. E.g., GPU backend native libs as optional runtime packages (already handled by UAIX). Use Git tags and GitHub Releases.
  • Interop: UAIX is managed, so minimal P/Invoke. If using CUDA or Metal, ensure native libraries are included or documented (e.g. CUDA toolkit requirement). Use .NET’s built-in interop to call any unmanaged parts (though UAIX abstracts most of this).

5. Design Constraints, Accessibility, Performance, Security

  • No jQuery/Bootstrap: The custom theme will use modern HTML5/CSS3 (Flexbox, Grid) and minimal JavaScript. Consider a lightweight CSS utility (e.g. Tailwind CSS or custom Sass) for rapid styling without large frameworks. Avoid any jQuery – use plain DOM API or modern frameworks (React/Vue) only if needed for interactive components (Docs search autocomplete can be plain JS from Algolia).
  • Layout: Mobile-first responsive design. Use semantic tags (header, nav, main, footer). Ensure code blocks and tables scroll on small screens, and images/videos are responsive.
  • Accessibility (WCAG 2.1/2.2): Follow W3C guidelines. Key points:
  • Perceivable: Provide alt text for images, captions for videos. Ensure sufficient color contrast.
  • Operable: Keyboard navigation (tab order, focus styles). Avoid elements with focus hidden.
  • Understandable: Clear headings, consistent navigation, descriptive links.
  • Robust: Use ARIA roles where needed (e.g. role="main", role="navigation"), ensure all UI elements work across browsers/screen readers. The official WCAG overview emphasizes these principles.
  • Performance: Minimize assets: compress images, use SVG icons, bundle/minify CSS/JS. Serve assets with caching headers. Use a fast SSG (Hugo/DocFX) to build quickly. Use lazy loading for images if needed.
  • Security: Serve the site over HTTPS (hosting supports it). Use Content Security Policy (CSP) to prevent XSS. Only accept Markdown from trusted authors (no user submissions on site). For the UI library: ensure user-supplied models are handled safely (UAIX already validates GGUF format and metadata). Scan code dependencies for vulnerabilities.
  • Privacy: No user tracking except opt-in analytics. Since site is static docs, user input is minimal.

6. Phased Roadmap and Timeline

We propose a phased development plan with the following milestones:

  1. Planning & Design (Low effort): Finalize requirements, choose tech stack (UI framework, SSG, etc.), draft site wireframes and API sketch.
  2. Core Runtime API (High): Implement the C# UI-layer library on top of UAIX.LmRuntime. Key tasks: model loading module, session management, inference calls (async), and data-binding support. Write unit tests.
  3. Sample Apps (Medium-High): Build example applications (e.g. Console, Avalonia/MAUI chat app) using the UI API. These serve as references.
  4. Cross-Platform Enablement (High): Adapt UI code for each platform: integrate file pickers (Android/iOS vs desktop), handle permissions. Package native requirements. Test on Windows, Linux, Android, macOS (optional iOS).
  5. Website & Docs (Medium): Develop the static site. Configure SSG (DocFX or Docusaurus), write Getting Started guide and tutorials. Generate API reference from XML docs. Integrate search (Algolia) and analytics.
  6. Testing & QA (Medium): Across platforms: use CI to run automated tests. Perform manual testing matrix:
PlatformUI & FunctionalityNotes
Windows 10/11 (x64)All features: model load, inference, UI renderingPrimary target.
Linux (e.g. Ubuntu)Core logic + Avalonia UI (if chosen)Use Avalonia; test .NET 8.
Android (API 29+)MAUI/Avalonia app: UI layout, file storage, GPU (if any)Emulators and devices.
macOS (12+)MAUI Catalyst or Avalonia: test UI and inference.Catalyst requires Mac build agent.
iOS (optional)(Simulated) basic build and run on device.Possibly skip heavy testing.

Each platform’s inference speed and stability should be measured (e.g. tokens/sec on test model).

  1. Beta Release (Low): Publish initial site and NuGet package, gather feedback.
  2. Improvements & Stability (Medium): Iterate on feedback, improve docs, add examples, strengthen tests.

The timeline (example) might span several months. Below is a Mermaid Gantt chart sketching major tasks and dependencies:

gantt
    title GgufRuntime.com Development Roadmap
    dateFormat  YYYY-MM-DD
    section Planning
    Requirements & Design         :done,    a1, 2026-07-01, 2026-07-14
    Tech Evaluation              :done,    a2, 2026-07-15, 2026-07-31
    section Core Development
    Runtime API Implementation   :active,  d1, 2026-08-01, 2026-09-15
    Documentation Setup          :         d2, after d1, 2026-09-16, 2026-10-01
    section UI Development
    Example Chat App (Desktop)   :         u1, after d1, 2026-09-16, 2026-10-15
    Mobile Integration (Android) :         u2, after u1, 2026-10-01, 2026-10-31
    macOS (Catalyst) App         :         u3, after u2, 2026-10-15, 2026-11-15
    iOS App (Optional)           :         u4, after u3, 2026-11-01, 2026-12-01
    section Testing & QA
    Cross-Platform Testing       :crit,    t1, after u3, 2026-10-20, 2026-11-30
    Performance Benchmarking     :crit,    t2, after t1, 2026-11-01, 2026-11-30
    section Launch
    Beta Release & Feedback      :         r1, after t2, 2026-12-01, 2026-12-15
    Final Release                :         r2, after r1, 2027-01-01, 2027-01-10

Effort is estimated qualitatively (Low/Medium/High). Key dependencies: UI dev depends on core API; site deployment depends on writing docs; cross-platform testing requires platform-specific build environments.

7. Developer Onboarding & Examples

To onboard new developers:

  • "Getting Started" Guide: Step-by-step instructions to set up a project, install the NuGet package, load a GGUF model, and run inference. Example snippet:
  var endpoint = new UAIX.LmRuntime.LocalEndpoint();
  var model = await endpoint.LoadModelAsync("models/my-model.gguf", token);
  using var session = await endpoint.CreateSessionAsync(model, token);
  var request = new UAIX.LmRuntime.Contracts.InferenceRequest
  {
      Prompt = "Hello, world!",
      MaxOutputTokens = 50
  };
  var result = await session.GenerateAsync(request, token);
  Console.WriteLine(result.OutputText);
  • Sample Code Snippets: Embed C# code examples in the docs (with [Display(Name="...")] on any sample classes as per user preference). For less-familiar languages (e.g. TypeScript for any web example), include comments.
  • Example Projects: Provide a small console app (showing basic generation), a desktop app (e.g. Avalonia chat UI), and a mobile app (MAUI) as open-source samples. These live in a Samples repo or folder. Include README instructions.
  • Code Comments & API Docs: Ensure all public APIs have XML documentation. The generated API reference should include descriptions and examples where possible.
  • Support Resources: Link to a discussion forum or GitHub Discussions/Issues for questions. Possibly set up a Discord or Gitter for realtime community help.

8. Risks, Mitigation, and Success Metrics

Risks & Mitigation:

  • Performance Constraints: Large LLMs on CPU can be slow or memory-hungry. Mitigate by recommending quantized models (GGUF format supports quantization), optimizing code, and documenting hardware requirements. Use UAIX’s existing performance evidence tools to benchmark.
  • Platform Differences: Mobile file paths/permissions or Linux compatibility might cause bugs. Mitigate by abstracting file I/O and testing early on each platform. Consider Android storage scopes and iOS file access.
  • UAIX API Changes: If UAIX.LmRuntime evolves, the UI API might break. Mitigate by targeting specific UAIX versions (use NuGet lock), and by designing the UI API to adapt (e.g. interfaces).
  • Model Licensing: GgufRuntime relies on third-party models (LLaMA license); the site must clearly state users must have legal rights to use models.
  • Security: Since inference runs locally, risk of malicious model data is low, but the site itself should avoid XSS and keep dependencies up-to-date.

Success Metrics:

  • Adoption: Number of NuGet downloads of the UI package, or GitHub stars/forks on sample repos.
  • Usage: Website analytics (unique visits to docs, search queries) as a proxy for interest.
  • Performance: Tokens-per-second benchmarks (published in docs) meeting or exceeding goals.
  • Community Engagement: Number of Q&A issues, contributions, and forum activity.
  • Quality: All major bugs fixed, test coverage % on core library, accessibility score (e.g. Lighthouse).

Conclusion: This roadmap lays out a comprehensive plan to build GgufRuntime.com and the accompanying C# UI library. By leveraging the UAIX.LmRuntime platform, modern .NET UI frameworks, and a robust documentation infrastructure, the project can deliver a high-quality cross-platform solution for local GGUF model inference. Primary sources include the UAIX.LmRuntime official site and package documentation, Microsoft’s guidance on async programming, and best practices for static docs and search integration. The above plan prioritizes thorough documentation, cross-platform consistency, and community engagement as key to success.