<?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: zyg</title>
    <description>The latest articles on DEV Community by zyg (@zouyugangian).</description>
    <link>https://dev.to/zouyugangian</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3648439%2Fa1667aeb-e1b3-4e7a-81d4-36c49127b0ad.png</url>
      <title>DEV Community: zyg</title>
      <link>https://dev.to/zouyugangian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zouyugangian"/>
    <language>en</language>
    <item>
      <title>Building Hy-CAD: A WebGPU-Powered CAD Viewer with Rust and Kiro</title>
      <dc:creator>zyg</dc:creator>
      <pubDate>Fri, 05 Dec 2025 18:54:34 +0000</pubDate>
      <link>https://dev.to/zouyugangian/building-hy-cad-a-webgpu-powered-cad-viewer-with-rust-and-kiro-n82</link>
      <guid>https://dev.to/zouyugangian/building-hy-cad-a-webgpu-powered-cad-viewer-with-rust-and-kiro-n82</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Why should viewing a CAD drawing require installing gigabytes of proprietary software? Engineers in the field and architects on-site all face this barrier. I set out to change that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hy-CAD&lt;/strong&gt; is a cloud-first CAD system that brings AutoCAD-grade rendering directly to your web browser. It handles complex DXF drawings with 100,000+ entities, renders via WebGPU acceleration, and delivers native desktop performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/your-screenshot-url-here" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/your-screenshot-url-here" alt="Hy-CAD Screenshot" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Instant DXF viewing (up to 50MB, zero installation)&lt;/li&gt;
&lt;li&gt;GPU-accelerated pan/zoom at 60fps&lt;/li&gt;
&lt;li&gt;Full entity support: lines, arcs, splines, hatches, dimensions, text&lt;/li&gt;
&lt;li&gt;Complete layer management&lt;/li&gt;
&lt;li&gt;Cross-platform: Windows, macOS, Linux, any modern browser&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rust&lt;/strong&gt; - Compiles to both native and WebAssembly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;wgpu&lt;/strong&gt; - Unified GPU abstraction (WebGPU/Vulkan/Metal/DirectX)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;egui&lt;/strong&gt; - Immediate mode UI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;glam&lt;/strong&gt; - Fast math operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Kiro Accelerated Development
&lt;/h2&gt;

&lt;p&gt;Kiro was instrumental in building Hy-CAD. Here's how:&lt;/p&gt;

&lt;h3&gt;
  
  
  Spec-Driven Development
&lt;/h3&gt;

&lt;p&gt;I created detailed specs in &lt;code&gt;.kiro/specs/&lt;/code&gt; for major features. Each spec contained requirements, design, and tasks. Kiro followed these specs precisely, implementing complex features like NURBS evaluation and tessellation caching without deviation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vibe Coding for Rapid Prototyping
&lt;/h3&gt;

&lt;p&gt;For exploratory work, I used conversational prompts. The most impressive generation was a complete WebGPU rendering pipeline—15,000+ lines of production Rust code including spatial indexing, geometry batching, and GPU culling shaders.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steering Documents
&lt;/h3&gt;

&lt;p&gt;Three steering files (&lt;code&gt;product.md&lt;/code&gt;, &lt;code&gt;structure.md&lt;/code&gt;, &lt;code&gt;tech.md&lt;/code&gt;) ensured Kiro always understood the project context. This eliminated 90% of architectural mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Challenges Solved
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Font Rendering&lt;/strong&gt;: CAD fonts (SHX) aren't browser-compatible. Built a font mapper translating CAD references to web-safe equivalents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Precision at Scale&lt;/strong&gt;: Engineering coordinates span micrometers to kilometers. Implemented dynamic view origin re-centering for sub-pixel accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebGPU Compatibility&lt;/strong&gt;: Created an abstraction layer with WebGL2 fallback for universal browser support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;95% native performance via WebAssembly&lt;/li&gt;
&lt;li&gt;&amp;lt;100ms first paint for typical drawings&lt;/li&gt;
&lt;li&gt;Zero server-side processing required&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;a href="https://dev.toyour-repo-url"&gt;GitHub Repository&lt;/a&gt;&lt;br&gt;
🔗 &lt;a href="https://dev.toyour-demo-url"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built for the Kiro Hackathon. Professional CAD tools belong to everyone.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>rust</category>
      <category>webassembly</category>
      <category>webgpu</category>
    </item>
  </channel>
</rss>
