<?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: dorukyy</title>
    <description>The latest articles on DEV Community by dorukyy (@dorukyy).</description>
    <link>https://dev.to/dorukyy</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%2F1906240%2F6a1b2014-553c-450c-9e55-1e078efe87c9.png</url>
      <title>DEV Community: dorukyy</title>
      <link>https://dev.to/dorukyy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dorukyy"/>
    <language>en</language>
    <item>
      <title>The same Rust app in 365 lines instead of 1,834: what a fixed structure buys you</title>
      <dc:creator>dorukyy</dc:creator>
      <pubDate>Sun, 25 Oct 2026 01:43:41 +0000</pubDate>
      <link>https://dev.to/dorukyy/the-same-rust-app-in-365-lines-instead-of-1834-what-a-fixed-structure-buys-you-e3m</link>
      <guid>https://dev.to/dorukyy/the-same-rust-app-in-365-lines-instead-of-1834-what-a-fixed-structure-buys-you-e3m</guid>
      <description>&lt;p&gt;I built the same shop app twice: once with Loco, once with Sofie, a Rust web framework I've been working on. Both have sign-up, orders with status transitions, an HTML page and a JSON API, a background audit job and an hourly expiry job. The Loco version is 1,834 lines of app code. The Sofie version is 365.&lt;/p&gt;

&lt;p&gt;Part of that gap is accounts. Loco generates its auth system into the app (889 lines), while Sofie ships it as a crate. Without accounts, it's 365 vs ~945, still about 2.5×.&lt;/p&gt;

&lt;p&gt;The rest comes from one idea: if every app follows the same fixed structure, the framework can read the whole app at build time and derive what you'd normally write by hand.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;• The aggregate struct is the schema. Columns, validation, input types, form fields and table columns all derive from it. Change a field once, and everything built on it follows.
• Wiring is generated, not hidden. There's no DI container and no reflection. sofie gen writes the wiring into a plain Rust file that you commit and can read.
• Architecture rules fail the build. A module can import only another module's contract. Cross-module SQL joins are an error, and the check runs during cargo build, not in code review.
• Modules are split-ready. They never share transactions, so sofie split can move one into its own app later without rewriting its queries.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The price is the structure itself: the folder layout isn't yours to choose, and code that doesn't fit a role gets no help from the framework.&lt;/p&gt;

&lt;p&gt;On the same machine, Sofie also built faster (20s vs 81s clean) and served more (~24k vs ~5.9k req/s on the JSON list). This is one small app on one machine, and the docs list everywhere the comparison is uneven.&lt;/p&gt;

&lt;p&gt;Sofie is a proof of concept, built with heavy use of Claude Code, and the APIs will change. I'd like feedback on the structure itself: which rules would you want enforced, and which would make you walk away?&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/sofie-rs/sofie" rel="noopener noreferrer"&gt;https://github.com/sofie-rs/sofie&lt;/a&gt;&lt;br&gt;
Docs and benchmark details: &lt;a href="https://sofie.rs/" rel="noopener noreferrer"&gt;https://sofie.rs/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>rust</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
