News for hackers. Stuff that matters.

withtypes

Re:Rust 1.51 on Thursday March 25, 2021 @03:02PM (#26584062)
In Rust there is smallvec https://docs.rs/crate/smallvec/
Fly.io is doing cool stuff! We will try out their platform to deploy Lunatic to the edge.
Wasmtime/Wasmer are both written in Rust so it was easy to integrate them. By the way, Wasm3 is an interpreter, not a JIT compiler, but this also has some use cases! For example, running an instance from “cold storage” requires a JIT compilation step which might take more time then just interpreting it. It would be cool to have a fast interpret like Wasm3 too.

We’ve created a crate “uptown_funk” which enables us to write Rust code which easily integrates with both Wasmer and Wasmtime. It was very helpful in implementing WASI and it takes a little bit different approach than Wasmer and Wasmtime. Regarding, Wasmer vs. Wasmtime, we don’t have a preference yet, both are great!

We agree with you, we are currently focused only on runtime running on an existing OS. We know there are different uses-cases so we could organize the project so that you can use what you need. In theory, you could use it right now inside of your Rust app to run plugins as Lunatic processes, but we need to document it a little bit better and maybe showcase an example.
We will take a look at embly! For Rust currently you just have to add wasm32-wasi target and compile for it. There are still some problems (WASI is not yet finished, maybe binary size could be optimized). Our current idea is to build a small cargo command which would do building and deploying. Wasmer is doing great work with tooling for other languages. We are now focused on Rust and AssemblyScript, but as Wasm and WASI mature we would like to simplify it for more languages.

We have been thinking about live process migration. I’m planning to do a demo where we run a lot of board games (e.g. chess) on authoritative servers using Lunatic. Then we give a developer ability to move a live game to a different machine without players noticing. We are still working out the details, but that area also excites us!

You are thinking in the right direction, but there are some technical differences between how NodeJS works compared to Erlang or Go. For example, in NodeJS you could accidentally block the event loop by some unintended computation, but Lunatic and Erlang periodically give control back to the runtime. We also want to abstract the syscall layer, for example, in our lunatic.run demo, you write a program which seemingly uses standard input/output but we actually read/write from a socket.

By the way, if it sounds vague, that's important info for us, we have to improve that!

Launch HN: Lunatic (YC W21) – An Erlang Inspired WebAssembly Platform

Hi HN! We’re Bernard & Hrvoje and we are Lunatic (https://lunatic.solutions/). Our goal is to improve how you run server-side code by building an open-source runtime that gives you lightweight processes, fault tolerance, and capability-based security for different parts of the application. Basically, we want to combine the power of Erlang with WebAssembly and bring that to new and existing...

( Read More... | 39 comments | 162 points | on HN )
"The recent war" (1991-1995), or Croatian War of Independence, was a mess and things like that happened. It doesn't mean anything.

In Croatian schools, they always say Tesla was Serbian and born in Croatian territory. Both Croatians and Serbs are proud of him, I guess.

As for mutual hatred, many people lost their families in the war, and obviously many Serbs were part of the aggression, so the relationship is no wonder.

Anyway, the article is great! Just what I needed.