this post was submitted on 24 Oct 2025
242 points (98.8% liked)

Technology

76388 readers
1740 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] embed_me@programming.dev 1 points 1 day ago (3 children)

But isn't WASM for web browsers? How will it be used to build general software

[–] gandalf_der_12te@discuss.tchncs.de 5 points 1 day ago (1 children)

But isn’t WASM for web browsers

not really, no. WASM is a generic hardware-independent format for instructions. it's like instructions for a virtual CPU, not a real one. it gets translated into the instructions for the real processor on the target device. in this way, it can run on any hardware.

comparing it to other setups such as java or javascript (which are also both hardware-independent), it runs much faster because it is much hardware-oriented, while java and javascript require abstract features such as a garbage collector, which makes real-time processes impossible.

[–] fonix232@fedia.io 3 points 19 hours ago (1 children)

See the main issue with that is you need to bundle everything into the app.

Modern computing is inherently cross-dependent on runtimes and shared libraries and whatnot, to save space. Why bundle the same 300MB runtime into five different apps when you can download it once and share it between the apps? Or even better, have a newer, backwards compatible version of the runtime installed and still be able to share it between apps.

With WASM you're looking at bundling every single dependency, every single runtime, framework and whatnot, in the final binary. Which is fine for one-off small things, but when everything is built that way, you're sacrificing tons of storage and bandwidth unnecessarily.

[–] gandalf_der_12te@discuss.tchncs.de 5 points 9 hours ago* (last edited 9 hours ago) (1 children)

With WASM you’re looking at bundling every single dependency, every single runtime, framework and whatnot, in the final binary.

you just don't know what you're talking about. wasm has a module-import structure with which you can link libraries at program start-up, and some wasm runtimes also offer possibilities for linking libraries at run-time.

[–] fonix232@fedia.io 2 points 8 hours ago

Oh, good to know. Last time I checked around WASM this wasn't really an option.

[–] Natanael@infosec.pub 3 points 1 day ago

WASM was made for browsers but can run anywhere. You can cross compile any language to it.

The trickier problem is compiler time hardware optimization, but there's talks about appending architecture specific optimization hints for the runtime, so you can let the compiler search for optimal implementations when creating the bytecode so the JIT engine doesn't have to. (that does mean you're essentially compiling multiple times while creating the bytecode, but for performance sensitive software it's worth it)

[–] eldebryn@lemmy.world 1 points 1 day ago

A bunch of desktop apps use electron anyways as a runtime. WASM could allow us to have better/more reliable software that doesn't rely on JS, which isn't ideal for many use cases.

Is it efficient? Definitely not, but for system apps we have other choices which are more performant like C and Rust. These days 90% of the software people use are either web apps in a browser or web apps with an electron gui running outside their browser but inside the Electron browser: P.