[HN Gopher] Rebuilding Prime Video UI with Rust and WebAssembly
       ___________________________________________________________________
        
       Rebuilding Prime Video UI with Rust and WebAssembly
        
       Author : 8s2ngy
       Score  : 82 points
       Date   : 2025-04-10 06:19 UTC (2 days ago)
        
 (HTM) web link (www.infoq.com)
 (TXT) w3m dump (www.infoq.com)
        
       | gozzoo wrote:
       | I'm not familiar with Rust or WebAssembly, but isn't Flutter more
       | appropriate specifically for such applications?
        
         | ainiriand wrote:
         | No, it is not.
        
         | echelon wrote:
         | Rust is finding itself everywhere. It's fantastic on the
         | server. It's shaping up to be fantastic for UI.
         | 
         | It's fast, ergonomic, and the code has fewer defects than code
         | written in other languages. (Google did a study on this.)
         | 
         | It's not as unapproachable as the memes make it seem. It's no
         | harder or less productive than Java or Golang to write. (Google
         | also did a study on this.)
         | 
         | The Rust WASM deploy story is sublime and is going to help it
         | take over the world.
        
           | hu3 wrote:
           | Is this satire? I have difficulty identifying those.
        
             | ghurtado wrote:
             | I only hope that it is, but you never know.
        
         | mathgeek wrote:
         | While it's possible to use Flutter for _some_ smart TVs and the
         | like, it's not generally at the top of the recommendations.
        
         | 6SixTy wrote:
         | Wikipedia says that Flutter can be transpiled to WebAssembly
         | for web deployment.
        
         | bickfordb wrote:
         | It's a similar effort. Flutter is a cross platform Dart UI
         | framework that compiles to WASM for the web and also has
         | Android/iOS build targets. The web version can be laggy on
         | trivial examples. I would guess this younger Rust framework is
         | less featureful than Flutter but is more efficient/faster (one
         | of the stated goals in the article).
        
         | jeroenhd wrote:
         | My experience with Flutter applications in the browser is
         | absolutely terrible. Rather unfortunate, as the things Flutter
         | promised would make it excellent for web applications like
         | these.
         | 
         | The concept behind the way these platform renders is very
         | similar, so the new Amazon UI may be terrible as well, but I
         | wouldn't expect whoever made the GUI framework they use now to
         | make the same mistakes Flutter made.
         | 
         | Edit: after looking into this some more, it looks like the
         | approach Amazon took is quite different from most Rust UI
         | libraries. They have written their own framework that basically
         | re-implements React but entirely on the WebAssembly side. I
         | don't think it works by throwing a <canvas> onto the screen and
         | implementing a browser rendering engine in JS+WASM like Flutter
         | does. They also seem to target native code where they do all
         | the rendering themselves, but probably faster because they
         | control all the layers and don't need to build a general-
         | purpose UI engine for their video player with extra steps.
        
           | mixmastamyk wrote:
           | Why is a browser required for "living room devices?"
        
       | MeetingsBrowser wrote:
       | I'm not familiar with Prime or its Video UI. Wouldn't a YouTube
       | front end be more appropriate to rebuild with this tech stack?
        
         | iLoveOncall wrote:
         | This isn't about someone building this as a side-project, it's
         | something Prime Video is working on. Which would be clear if
         | you had even just opened the article.
        
           | a3w wrote:
           | Opened it. Skimmed it. Got to the conclusion, that it sells a
           | "how to build something like the Amazon UI as a tutorial"
           | course.
           | 
           | Not just my predecessor was confused by the wording and
           | categories put on the page.
        
       | badlibrarian wrote:
       | Runs great on an underpowered Roku in HTML and JavaScript. But I
       | guess why not. Developers gotta developer.
       | 
       | My main issue is having to buy my parents a bigger TV every few
       | years because the fonts keep getting smaller and their eyes keep
       | getting worse.
        
         | iLoveOncall wrote:
         | I have tested the reactivity difference between the current UI
         | and the Rust rewrite and it is staggeringly faster, this is not
         | just a dumb pet project.
        
           | badlibrarian wrote:
           | Just to make sure we're on the same page here, this is the
           | app that lets me move a highlighted rectangle using a
           | controller with 300ms latency to select the next episode of
           | Reacher, right?
        
             | iLoveOncall wrote:
             | Yes, and the difference is incredible. It leads to a much
             | less frustrating experience when navigating around the app
             | overall.
        
         | jeroenhd wrote:
         | But this also runs in the browser. Using HTML and Javascript.
         | Except now it's done slightly differently in a way that's
         | easier for browsers to optimize, if done well.
         | 
         | WebAssembly and Rust may be massive overkill for most web
         | applications, but so is React or Vue or whatever Javascript
         | framework is popular these days. When the inevitable rewrite
         | happens, we might as well enjoy the benefits of the new,
         | faster-than-the-old-evolved-moloch web UI.
         | 
         | If anything the move from the old system (React+WebAssembly) to
         | the new one (Rust+minimal JS+WebAssembly) will make the web
         | application itself smaller and easier to grasp.
        
       ___________________________________________________________________
       (page generated 2025-04-12 23:00 UTC)