<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Edgar Mesquita</title>
    <description>The latest articles on DEV Community by Edgar Mesquita (@edgarmesquita_rj).</description>
    <link>https://dev.to/edgarmesquita_rj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4253954%2F4b299a79-a64d-4beb-97a5-783f8a39d2f0.jpeg</url>
      <title>DEV Community: Edgar Mesquita</title>
      <link>https://dev.to/edgarmesquita_rj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/edgarmesquita_rj"/>
    <language>en</language>
    <item>
      <title>Building a Cross-Platform UI SDK in .NET 10: C# to JavaScript Without WASM, and GPU Pixels Without a WebView</title>
      <dc:creator>Edgar Mesquita</dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:26:53 +0000</pubDate>
      <link>https://dev.to/edgarmesquita_rj/building-a-cross-platform-ui-sdk-in-net-10-c-to-javascript-without-wasm-and-gpu-pixels-without-2do4</link>
      <guid>https://dev.to/edgarmesquita_rj/building-a-cross-platform-ui-sdk-in-net-10-c-to-javascript-without-wasm-and-gpu-pixels-without-2do4</guid>
      <description>&lt;p&gt;If you are a .NET developer building products across web, mobile, and desktop, you usually have to pick your trade-off:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Maintain separate stacks:&lt;/strong&gt; C# on the backend, React or TypeScript on the web, and Swift, Kotlin, or Dart for mobile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blazor WASM:&lt;/strong&gt; stay in C#, but ship the .NET runtime to the browser and pay for it in the first download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WebView wrappers:&lt;/strong&gt; share UI code across desktop and mobile, but give up native rendering and the platform's feel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since January, I have been building &lt;strong&gt;eQuantic.UI&lt;/strong&gt;, an open-source UI SDK for .NET 10 designed to remove these trade-offs. The idea is simple: write your components once, in strongly typed C#, against a declarative visual vocabulary, and let the SDK realize each target through its own real rendering path.&lt;/p&gt;

&lt;p&gt;One C# codebase. Real web. Real native.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/gtGB5wPYEak" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;You can try it right now in the &lt;a href="https://ui.equantic.tech/playground" rel="noopener noreferrer"&gt;browser playground&lt;/a&gt;: write a component, press Run, and watch it render, with nothing to install. The source is on &lt;a href="https://github.com/eQuantic/equantic-ui" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  What the Code Looks Like
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;eQuantic.UI&lt;/strong&gt;, there is no Razor, no XAML, no HTML templates, and no CSS files. Everything is C#, from layout and state to strongly typed styles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"MyApp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HomePage&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;StatefulComponent&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="nc"&gt;VisualNode&lt;/span&gt; &lt;span class="nc"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ComponentContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Theme&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BoxStyle&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SizeValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Fill&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;Height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SizeValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Fill&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;Background&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Background&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;Padding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;EdgeInsets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;All&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Space&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nc"&gt;Column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Space&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"MyApp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TypeRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TextPrimary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;Row&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Space&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;S3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Count"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;onPressed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;SetState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Reset"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Variant&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Outline&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;onPressed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;SetState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;$&lt;span class="s2"&gt;"Clicked {_count} times"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TypeRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Caption&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TextMuted&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same component renders as a server-rendered, hydrated web page and inside a native window. What changes is the head project, not the component. A web app (&lt;code&gt;eQuantic.UI.Sdk&lt;/code&gt;) routes it with &lt;code&gt;[Page]&lt;/code&gt;, and a native app (&lt;code&gt;eQuantic.UI.Sdk.Native&lt;/code&gt;) names its root component in &lt;code&gt;Program.cs&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  How It Works Under the Hood
&lt;/h3&gt;

&lt;p&gt;Instead of forcing one runtime everywhere, the SDK gives each target its own path:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Web Without WebAssembly
&lt;/h4&gt;

&lt;p&gt;On the web, &lt;strong&gt;eQuantic.UI&lt;/strong&gt; does not ship the .NET runtime to the browser. At build time, its compiler, built on &lt;strong&gt;Roslyn&lt;/strong&gt;'s semantic model rather than the syntax tree alone, translates your components to TypeScript and then to plain JavaScript, one module per page, with code splitting. The page loads a small runtime whose gzipped size is a budget the test suite enforces.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fidelity is tested, not assumed:&lt;/strong&gt; a conformance suite runs every case under .NET and in the browser's JavaScript engine. What the compiler cannot translate faithfully fails the build with a diagnostic, instead of answering differently at runtime. Integer widths, &lt;code&gt;float&lt;/code&gt; rounding, pattern matching, and even LINQ's lazy evaluation behave as they do in .NET.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSR + hydration:&lt;/strong&gt; pages render on the server first, for fast first loads and SEO, then hydrate in the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typed styles, no CSS:&lt;/strong&gt; styles are C# values (colours as tokens, spacing, type roles) that the server lowers to deduplicated atomic CSS classes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in RPC:&lt;/strong&gt; a method marked &lt;code&gt;[ServerAction]&lt;/code&gt; is callable from a UI event as a typed call, with &lt;code&gt;[Authorize]&lt;/code&gt; enforced on the server. No REST controller boilerplate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hot reload that keeps your state:&lt;/strong&gt; an edit reaches the browser in about half a second (the warm median CI measures on every merge), with the page's fields kept.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only the .NET SDK:&lt;/strong&gt; no Node.js, npm, webpack, or Vite. The bundler ships embedded, as a per-OS NuGet package the SDK adds by itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Native GPU Rendering via Photon (No WebView, No Skia)
&lt;/h4&gt;

&lt;p&gt;On macOS, iOS, Android, and Windows, the same component tree renders in a native window through &lt;strong&gt;Photon&lt;/strong&gt;, a GPU engine of our own over &lt;strong&gt;Metal&lt;/strong&gt; and &lt;strong&gt;Vulkan&lt;/strong&gt;, with a CPU reference backend for tests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is no embedded browser or WebView layer.&lt;/li&gt;
&lt;li&gt;Shapes, selection marks, focus rings, and editing carets are drawn by shaders written once in Slang and compiled to Metal and SPIR-V. Text comes from each platform's own engine.&lt;/li&gt;
&lt;li&gt;Photon is the experimental track for now: the 1.0 we are working toward promises the web SDK as stable, and marks the native assemblies experimental.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Transactional Email as a Target
&lt;/h4&gt;

&lt;p&gt;Because components are built against an abstract vocabulary (&lt;code&gt;Box&lt;/code&gt;, &lt;code&gt;Row&lt;/code&gt;, &lt;code&gt;Column&lt;/code&gt;, &lt;code&gt;Text&lt;/code&gt;, &lt;code&gt;Stack&lt;/code&gt;, &lt;code&gt;ScrollView&lt;/code&gt;, &lt;code&gt;Overlay&lt;/code&gt;), the SDK also includes an email realizer. The part of the vocabulary an email client can hold becomes email-safe HTML tables with inline styles, and the plain-text version comes from the same component tree.&lt;/p&gt;




&lt;h3&gt;
  
  
  Zero-Boilerplate Project Setup
&lt;/h3&gt;

&lt;p&gt;The project file names the SDK and nothing else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Project&lt;/span&gt; &lt;span class="na"&gt;Sdk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"eQuantic.UI.Sdk"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;TargetFramework&amp;gt;&lt;/span&gt;net10.0&lt;span class="nt"&gt;&amp;lt;/TargetFramework&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ImplicitUsings&amp;gt;&lt;/span&gt;enable&lt;span class="nt"&gt;&amp;lt;/ImplicitUsings&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Nullable&amp;gt;&lt;/span&gt;enable&lt;span class="nt"&gt;&amp;lt;/Nullable&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Project&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK's version lives in &lt;code&gt;global.json&lt;/code&gt;, which the template writes. There are no &lt;code&gt;Info.plist&lt;/code&gt; or &lt;code&gt;AndroidManifest.xml&lt;/code&gt; files to maintain: a declaration in C#, such as &lt;code&gt;builder.Capabilities.UseCamera("why")&lt;/code&gt;, becomes the platform's entry at build time. Localization is checked at build time too. A call that passes fewer arguments than its &lt;code&gt;.resx&lt;/code&gt; template has placeholders, or a translation whose &lt;code&gt;{0}&lt;/code&gt; and &lt;code&gt;{1}&lt;/code&gt; do not match the neutral resource, fails the build instead of breaking a page.&lt;/p&gt;

&lt;p&gt;To try it locally with the .NET 10 SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet new install eQuantic.UI.Templates

&lt;span class="c"&gt;# Create a web app&lt;/span&gt;
dotnet new equantic-app -n MyApp
&lt;span class="nb"&gt;cd&lt;/span&gt; MyApp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; dotnet run

&lt;span class="c"&gt;# Or create a native GPU window app&lt;/span&gt;
dotnet new equantic-native -n MyNativeApp
&lt;span class="nb"&gt;cd&lt;/span&gt; MyNativeApp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; dotnet run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Current Status and Feedback
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;eQuantic.UI&lt;/strong&gt; is MIT-licensed and in active development: &lt;code&gt;0.2.0-preview.69&lt;/code&gt; is on NuGet, and we are working toward a 1.0 with a stable web SDK.&lt;/p&gt;

&lt;p&gt;If you work with .NET, compilers, or graphics programming, I would love to hear your thoughts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What edge cases do you think are trickiest when transpiling C# to JavaScript?&lt;/li&gt;
&lt;li&gt;Which native controls or layout primitives would you expect first in a custom GPU UI engine?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture docs, samples, and roadmap are on GitHub: &lt;a href="https://github.com/eQuantic/equantic-ui" rel="noopener noreferrer"&gt;github.com/eQuantic/equantic-ui&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
