6 ms·
Rebuilding Prime Video UI with Rust and WebAssembly
- deleted 1y ago[deleted]
- gozzoo 1y agoI'm not familiar with Rust or WebAssembly, but isn't Flutter more appropriate specifically for such applications?
- mathgeek 1y agoWhile it's possible to use Flutter for _some_ smart TVs and the like, it's not generally at the top of the recommendations.
- j45 1y agoHappy to learn what might be - especially from the one codebase to everywhere perspective.
- ainiriand 1y agoNo, it is not.
- echelon 1y agoRust 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 1y agoIs this satire? I have difficulty identifying those.
- ghurtado 1y agoI only hope that it is, but you never know.
- CyanLite2 1y agoWASM Components levels the playing field across all languages. You can mix and match a C# Blazor component and a Rust component, and a Python component and they all compile to WASM and runs at equal speed.
- 6SixTy 1y agoWikipedia says that Flutter can be transpiled to WebAssembly for web deployment.
- bickfordb 1y agoIt'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 1y agoMy 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 1y agoWhy is a browser required for "living room devices?"
- mathgeek 1y agoFrom the article: > … but also in browsers because some living room devices today have just an HTML5 browser and don't even have flash space big enough to put our native C++ engine.
- jeroenhd 1y agoAsk the people buying and making those devices, not the people trying to get their services to work on them. The answer is probably "because the alternative is worse". I too would rather make a single web app than separate Tizen/tvOS/WebOS/Android/whatever Roku runs apps.
- mixmastamyk 1y agoI suppose, but Flutter on a Rasberry Pi-like device is compelling as well.
- 1y ago
- MeetingsBrowser 1y agoI'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 1y agoThis 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 1y agoOpened 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 1y agoRuns 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 1y agoI 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 1y agoJust 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 1y agoYes, and the difference is incredible. It leads to a much less frustrating experience when navigating around the app overall.
- tedunangst 1y agoPerhaps we might ask not just how the new version is so fast, but why is the old version so slow.
- Swizec 1y ago> why is the old version so slow In my experience of building consumer web applications, they all start fast. Then someone says “We need to track every interaction in mixpanel. What’s even the point if we don’t know it happened”. Then the sales team says “We need to track in Salesforce, nobody on our team looks at mixpanel” Then the marketing team goes “We must consolidate in google analytics, nothing else fits our usecase” Then the other product team says “We need Amplitude” Then the re-engagement marketing team goes “Braze for us please, we must know when customers do a thing so we can trigger campaigns” Then the product growth hacker marketing team says “Our recommendation engine needs to use the custom in-house framework so we can train our models” Then someone goes “Hey it looks like we’re losing events sometimes, you have to make sure users don’t leave the screen until all events are submitted” Then someone has a cool idea: “Wow it would be great if we could see where users are looking with something like Hotjar” And now you have an app where every interaction triggers 20 different trackers, waits for all of them to settle, then reacts to your action. Just look at the AWS homepage one day – I once counted 70 requests blocked by Brave’s built-in blockers before I even moved my mouse. It’s slightly better after login – only a dozen or so tracker requests iirc.
- rgbrgb 1y agois it just me or does the prime video player seem to have a bug in chrome where the UI shows over the video and never goes away after pausing in full screen? wondering if that’s the UI in question
- jackothy 1y agoWish they had said something about open sourcing their SDK. They mentioned Leptos as an inspiration but this is clearly very different and has a lot of interesting features.
- curtisszmania 1y ago[dead]
- greatgib 1y ago[dead]
- pmkary 1y agoWow, I mean for a TV app, wow
- Aissen 1y agoIsn't that the solution that Disney+ basically implemented at launch?