pdgonzalez872

pdgonzalez872

  • If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing list somewhere, but I didn’t find it.

I think I’m not alone when thinking about the awesome possibility of using Elixir for both backend and frontend work. I honestly think that this would be a massive win for Elixir. It would be awesome!! With that said, here are a couple of questions:

  1. What are some of the tradeoffs that we’d make when using Elixir for both (front + back)end development? I don’t know much about WASM to have an opinion/idea of what to expect here. But, I know a lot of folks here do.

  2. Is there anything holding the Elixir + WASM effort back? Is it just open source + time to get it working? Is there some technical challenge that makes this a pain? If there are, could you please list them?

  3. Is WASM on the roadmap for Elixir at all?

There seems to be a library that started trying to accomplish this:
https://github.com/jamen/elixir-wasm

Thanks! Excited to hear more about this!

Showing Posts 1 to 10

NobbZ

NobbZ

There is already elixir script, which compiles elixir to JavaScript, I’m not sure if there are plans to move it to generate WASM though.

AstonJ

AstonJ

There’s also a thread here you might find interesting:

And here’s the ElixirScript thread:

I would love to be able to use Elixir instead of JS on the front end as well :003:

pdgonzalez872

pdgonzalez872 OP

Ah, fantastic! I guess I didn’t search WebAssembly, just WASM… oh well, thanks for pointing this out @AstonJ!

OvermindDL1

OvermindDL1

WASM is getting proper threads in the spec soon, so with that it makes it even easier and better to compile the VM itself via to webassembly as well.

MrDoops

MrDoops

Wouldn’t the dynamic typing and uniqueness of the BEAM make compiling to WebAssembly more difficult than something like Rust or OCaml? I would expect static typing to make that conversion a lot easier. How much OTP could operate as normal given Elixir → WASM compilation?

Maybe a WebGL on WASM remote controlled Drab sort of deal would be feasible? Flutter’s approach to cutting out the cruft and using OpenGL directly seems pretty compelling - I wonder if something similar could be done with WASM and WebGL? We’ll get 60+ fps web apps without Javascript one way or another - that I’m sure of.

OvermindDL1

OvermindDL1

The BEAM has some assembly in it so that would need to be rewritten, but otherwise the rest of the functionality can be shimmed not too hard, just take time. :slight_smile:
But I could see it as fully operational.

dimitarvp

dimitarvp

This might be related (@bryanjos is the maintainer):

bryanjos

bryanjos

I think I’m interested to see if there are any projects out there trying to compile BEAM VM to WebAssembly. Could a release be a good target to compile to WebAssembly? Could the LLVM backend for Erlang be a good place to start looking?

As far as Elixir itself to WebAssembly, I don’t know if the lack of a garbage collector in WebAssembly will be a show stopper. That would be something that would need to be answered

Threading shouldn’t matter as much. Processes are about concurrency, not parallelism.

There are a lot more questions than answers at this point. Long term goals that are good to shoot for.

In the mean time, there is ElixirScript, lol. But seriously if there is more attention and contributions to it, it could work and maybe slowly, move to WebAssembly when it’s more ready

OvermindDL1

OvermindDL1

The BEAM already has it’s own GC, using javascript’s GC in the BEAM ecosystem would be radically inefficient as they are substantially different operating models.

bryanjos

bryanjos

Yeah if the BEAM was compiled to it, that would not be an issue. I meant if going directly from Elixir to WebAssembly

Where Next? Top

Trending in Discussions Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
achempion
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
jtormey
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
CodeSync
Code BEAM Europe 2026 – Call for Talks is Open! We’re excited to announce that Code BEAM Europe 2026 is now open for talk submissions :t...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews