News for hackers. Stuff that matters.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by gozzoo on Saturday April 12, 2025 @03:16PM (#43667168)
I'm not familiar with Rust or WebAssembly, but isn't Flutter more appropriate specifically for such applications?
Re:Rebuilding Prime Video UI with Rust and WebAssembly by ainiriand on Saturday April 12, 2025 @03:18PM (#43667179)
No, it is not.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by echelon on Saturday April 12, 2025 @04:21PM (#43667637)
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.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by CyanLite2 on Saturday April 12, 2025 @08:08PM (#43668948)
WASM 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.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by echelon on Saturday April 12, 2025 @10:43PM (#43669639)
Those other languages will have a GC.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by hu3 on Sunday April 13, 2025 @08:10AM (#43672180)
not Zig
Re:Rebuilding Prime Video UI with Rust and WebAssembly by nilslice on Sunday April 13, 2025 @01:00AM (#43670209)
sounds like someone hasn’t actually tried or benchmarked this :)
Re:Rebuilding Prime Video UI with Rust and WebAssembly by hu3 on Saturday April 12, 2025 @04:25PM (#43667668)
Is this satire? I have difficulty identifying those.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by ghurtado on Saturday April 12, 2025 @04:29PM (#43667708)
I only hope that it is, but you never know.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by mathgeek on Saturday April 12, 2025 @04:28PM (#43667706)
While it's possible to use Flutter for _some_ smart TVs and the like, it's not generally at the top of the recommendations.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by j45 on Saturday April 12, 2025 @11:50PM (#43669948)
Happy to learn what might be - especially from the one codebase to everywhere perspective.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by 6SixTy on Saturday April 12, 2025 @04:49PM (#43667835)
Wikipedia says that Flutter can be transpiled to WebAssembly for web deployment.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by bickfordb on Saturday April 12, 2025 @05:05PM (#43667936)
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).
Re:Rebuilding Prime Video UI with Rust and WebAssembly by jeroenhd on Saturday April 12, 2025 @05:17PM (#43668001)
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.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by mixmastamyk on Saturday April 12, 2025 @06:15PM (#43668331)
Why is a browser required for "living room devices?"
Re:Rebuilding Prime Video UI with Rust and WebAssembly by mathgeek on Saturday April 12, 2025 @07:13PM (#43668676)
From 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.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by jeroenhd on Sunday April 13, 2025 @09:38AM (#43672728)
Ask 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.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by mixmastamyk on Sunday April 13, 2025 @02:19PM (#43674736)
I suppose, but Flutter on a Rasberry Pi-like device is compelling as well.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by j45 on Saturday April 12, 2025 @11:50PM (#43669944)
It would be helpful to know what version of flutter you experienced this with, your comment caught my attention at least, thanks.
Re:Rebuilding Prime Video UI with Rust and WebAssembly by jeroenhd on Sunday April 13, 2025 @09:50AM (#43672793)
My latest bad experience was whatever version fluffychat used last December, thst was the most recent time I've tried to make a web app work for me. Before that, every version of Flutter I've tried myself, both in debug and release builds. The UI is stuttery and unresponsive in a way that's not happening in mobile platforms, although even on desktop platforms I find the latency rather high. That also includes some rather small Flutter desktop+web applications I've written myself.

It seems like Flutter apps run better in Chrome, but I'm on Firefox. Could be a Flutter optimisation issue or something in Flutter triggering a Firefox bug. Whatever it is, it's making me avoid Flutter web apps.

Re:Rebuilding Prime Video UI with Rust and WebAssembly by j45 on Sunday April 13, 2025 @03:02PM (#43675044)
My understanding is the web app can stutter, but the builds for the rest were OK?

I wonder if Flutter could run via wasm in browser.