<?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: white kotan</title>
    <description>The latest articles on DEV Community by white kotan (@whitekotan).</description>
    <link>https://dev.to/whitekotan</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%2F3746785%2Fbf1355f7-d3d6-42fc-958b-a37f631868ce.png</url>
      <title>DEV Community: white kotan</title>
      <link>https://dev.to/whitekotan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/whitekotan"/>
    <language>en</language>
    <item>
      <title>I Tried to Build a Local-First LeetCode with Rust and Failed</title>
      <dc:creator>white kotan</dc:creator>
      <pubDate>Mon, 02 Feb 2026 07:41:37 +0000</pubDate>
      <link>https://dev.to/whitekotan/i-tried-to-build-a-local-first-leetcode-with-rust-and-failed-5d18</link>
      <guid>https://dev.to/whitekotan/i-tried-to-build-a-local-first-leetcode-with-rust-and-failed-5d18</guid>
      <description>&lt;p&gt;I recently had an idea to build an educational platform something like LeetCode, but open-source and with a different twist. My specific goal was to design and test a system that could handle multiple programming languages within the platform.&lt;/p&gt;

&lt;p&gt;Since I was aiming for a "local-first" approach, using Docker containers wasn't an option. Not everyone has Docker installed, and frankly, not everyone knows what it is.&lt;/p&gt;

&lt;p&gt;So, my choice fell on WebAssembly. It’s fast, compact, and allows for a pure browser-based frontend without the hassle of desktop setups. However, my knowledge of WASM was superficial at best. After a few minutes of brainstorming, I decided to use Rust for the backend core.&lt;/p&gt;

&lt;p&gt;The task seemed straightforward:&lt;/p&gt;

&lt;p&gt;Take Rust.&lt;/p&gt;

&lt;p&gt;Take an interpreter for a language (I chose Python and the RustPython crate).&lt;/p&gt;

&lt;p&gt;Run it using wasm-bindgen.&lt;/p&gt;

&lt;p&gt;Accept user code from the frontend, throw it into the interpreter, get the result, and show it to the user. Everyone’s happy, right?&lt;/p&gt;

&lt;p&gt;I dug into the documentation and examples. I built the interpreter and tested it as a standalone script-it ran perfectly. Then, I compiled it as a library (yes, Rust WASM targets need to be compiled as libraries).&lt;/p&gt;

&lt;p&gt;The code worked, but it was stripped down. The Standard Library (stdlib) was disabled, following the guide I found. It wasn't immediately critical-I really just needed the print function, and I could have written a simple hacky workaround for that. But I got curious. It became important to me to understand how to do it right.&lt;/p&gt;

&lt;p&gt;And that’s when the HELL began.&lt;/p&gt;

&lt;p&gt;Instead of documentation on the official site, I saw this:. I couldn't find any clear explanations in the examples either; everyone was using vm::Interpreter::without_stdlib-essentially running it naked, without the standard library.&lt;/p&gt;

&lt;p&gt;It was 6 AM. My brain was fried. I decided to try and get at least a messy result using AI. ChatGPT - terrible. Gemini - terrible. Claude - also terrible.&lt;/p&gt;

&lt;p&gt;The last two tried to guide me through the "freeze" method, but that wasn't exactly what I needed. The worst part was dealing with dependencies-they were either hopelessly outdated or incompatible with each other.&lt;/p&gt;

&lt;p&gt;In the end, I gave up on that approach.&lt;/p&gt;

&lt;p&gt;But as I was finally going to sleep, it hit me: If a programming language can be packaged into WebAssembly, that means I can treat each language as a separated, isolated box that is simply called from the frontend when the user selects it.&lt;/p&gt;

&lt;p&gt;The Conclusion: I wrestled with Rust, I wrestled with WebAssembly, and while I didn't get the result I expected, I now have a solid architectural concept in hand. I plan to code this new approach in the next few days.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>webassembly</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
