you are viewing a single comment's thread
view the rest of the comments
[–] 156 points 2 days ago (17 children)

I think that the headline says more about Electron than it does about Rust.

  • source
  • hideshow 17 child comments
  • [–] 37 points 2 days ago* (last edited 2 days ago) (2 children)

    Even the guys who invented Electron (developers of the Atom text editor) stopped using it years ago and switched to Rust when writing their new editor, Zed, and its UI framework GPUI (which Discord will be using too).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 1 day ago (1 child)

    Maybe we don’t want to use JavaScript for literally everything.

    It’s great to see it. I wonder how much of this push comes from the high price of memory.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 day ago

    The price of memory-thing is probably not that important as compared to the AI-assisted coding thing. Making things in Rust when you have access to AI tools is dead simple, which was always the argument for making things in Electron. Porting things from one language to another also happens to be one of the sweet spots for AI coding tools, they thrive on tasks that have very clear specs - an already existing codebase with tests is just about as clear of a spec as you can get.

  • source
  • parent
  • [–] 66 points 2 days ago (13 children)

    Yeah exactly. "Just" 240 MB, it's still a lot for a glorified chat app

  • source
  • parent
  • hideshow 13 child comments
  • [–] 22 points 2 days ago (8 children)

    Perhaps it’s vibecoded slop?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 11 points 2 days ago (5 children)

    Rust apps seem to always be on the heavy side, maybe depends how much debug info they leave in

  • source
  • parent
  • hideshow 5 child comments
  • [–] 36 points 2 days ago (1 child)

    Indeed, they’re probably shipping a backtrace symboliser, and since there’s no system-wide equivalent of libc to link against, they’ll be including the entire Rust standard library with the binary too.

    My other hunch is the Krisp noise cancellation ML model is a huge chunk of the memory footprint.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 7 points 1 day ago (2 children)

    I once played around with reverse engineering a Rust program. I compiled the optimized version of the standard "hello world" program which somehow turned into 50,000 lines of assembly.

    It looked like it copied over dozens of functions from libc and the data section was filled with every single possible error string "file not found", "connection timed out", etc. as if there was a possibility of hello world generating an access denied error.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 day ago

    Rust has static linking, you get the necessary (and some unnecessary) parts of the standard library in your binary instead of the user having to install the library the way you have to have a libc installed. Makes for fatter binaries but much easier compatibility.

  • source
  • parent