wanton7

wanton7

Lunatic: Actor based WebAssembly runtime for the backend

Found interesting actor-model project.

https://github.com/lunatic-lang/lunatic

Most Liked

bkolobara

bkolobara

Hi! I’m the author of Lunatic and a huge Elixir fan :heart:.

I started working on Lunatic when I moved to Rust and missed the features from the BEAM world. Especially being able to just spawn a lightweight process that is self isolated. It’s impossible to do this in Rust using just libraries because all the code shares the same memory space.

I came up with the idea to use WebAssembly instances as process replacements. Contrary to Lumen, LAM and other implementations, Lunatic doesn’t run inside one WebAssembly instance, but runs thousands of instances as lightweight processes.

This gives Lunatic also a bit more powerful per process isolation than you get on the BEAM. E.g:

  1. You can spawn a process that can only use a limited amount of memory or CPU.
  2. You can use C bindings without fear. Once everything is compiled to WebAssembly, long running code will still be preempted and crashes don’t escape the process boundary.
  3. You can limit syscalls on a per process level, e.g. spawn this process but don’t let any code running in it open a network connection.
  4. Redirect syscallls, e.g. if this process writes to a log file redirect the stream over the network to an Elastic cluster.
  5. You can use it from you favourite language if it compiles to WebAssembly. Currently we only provide libraries for Rust and AssemblyScript.

The project is still in its early stage and not all features are implemented yet, but we got initial funding from YC and are working full time on it.

16
Post #2
bkolobara

bkolobara

At the moment we don’t provide any APIs for GUIs (or wrappers) and solely focus on backend applications, but it could be an addition in the future.

The runtime works on Windows, MacOs and Linux (x64 & arm64).

michaelvigor

michaelvigor

This has an updated website now: https://lunatic.solutions/

Similar to Lumen, but instead of Erlang compiling to WebAssembly, this is just inspired by Erlang, and written in Rust.

Last Post!

Rich_Morin

Rich_Morin

This seems like an interesting notion. They write code in Rust, compile it into WebAssembly, and then call on some infrastructure that emulates the Erlang/OTP environment.

Functional Futures: Lunatic with Bernard Kolobara

-r

Where Next?

Popular in Discussions Top

tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&*())^% %%:>" From this string, I want to only keep the integers, ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
crispinb
On reading dhh’s latest The One Person Framework it strikes me that Phoenix with LiveView is already pretty much this. However, never hav...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement