All Projects → lunatic-solutions → Lunatic

lunatic-solutions / Lunatic

Licence: other
Lunatic is an Erlang-inspired runtime for WebAssembly

Programming Languages

rust
11053 projects
WebAssembly
147 projects

Projects that are alternatives of or similar to Lunatic

Wasmtime
Standalone JIT-style runtime for WebAssembly, using Cranelift
Stars: ✭ 6,413 (+209.21%)
Mutual labels:  webassembly, wasm, runtime, wasi, wasmtime
Wasmer
🚀 The leading WebAssembly Runtime supporting WASI and Emscripten
Stars: ✭ 11,047 (+432.64%)
Mutual labels:  webassembly, wasm, wasi, wasmer
Lucet
Lucet, the Sandboxing WebAssembly Compiler.
Stars: ✭ 4,006 (+93.15%)
Mutual labels:  webassembly, wasm, assemblyscript, wasi
Alchemyvm
WebAssembly Virtual Machine Built In Elixir
Stars: ✭ 176 (-91.51%)
Mutual labels:  webassembly, wasm, vm
Lam
🚀 a lightweight, universal actor-model vm for writing scalable and reliable applications that run natively and on WebAssembly
Stars: ✭ 176 (-91.51%)
Mutual labels:  webassembly, wasm, vm
Wasm Micro Runtime
WebAssembly Micro Runtime (WAMR)
Stars: ✭ 2,440 (+17.65%)
Mutual labels:  webassembly, wasm, runtime
Assemblyscript
A TypeScript-like language for WebAssembly.
Stars: ✭ 13,152 (+534.14%)
Mutual labels:  webassembly, wasm, assemblyscript
Wasmtime Go
Go WebAssembly runtime powered by Wasmtime
Stars: ✭ 239 (-88.48%)
Mutual labels:  webassembly, wasm, runtime
wazero
wazero: the zero dependency WebAssembly runtime for Go developers
Stars: ✭ 2,065 (-0.43%)
Mutual labels:  vm, runtime, wasi
cabasa
Haxe Framework for WebAssembly
Stars: ✭ 30 (-98.55%)
Mutual labels:  runtime, webassembly, wasm
wasmer-zig
Zig bindings for the Wasmer WebAssembly runtime
Stars: ✭ 24 (-98.84%)
Mutual labels:  wasm, wasi, wasmer
node-wasi
WASI for Node.js
Stars: ✭ 64 (-96.91%)
Mutual labels:  webassembly, wasm, wasi
Awesome Wasm Runtimes
A list of webassemby runtimes
Stars: ✭ 490 (-76.37%)
Mutual labels:  webassembly, wasm, vm
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+337.22%)
Mutual labels:  webassembly, wasm, wasi
Client
An alternative Polkadot Runtime Environment implementation acting as a full-node (excluding block production for validators) for syncing with Substrate-based chains.
Stars: ✭ 82 (-96.05%)
Mutual labels:  wasm, runtime
Denoflate
WebAssembly powered Deflate/Gzip/Zlib compression for Deno, written in Rust
Stars: ✭ 80 (-96.14%)
Mutual labels:  webassembly, wasm
Wasm To Oci
Use OCI registries to distribute WASM modules
Stars: ✭ 83 (-96%)
Mutual labels:  webassembly, wasm
Web Dsp
A client-side signal processing library utilizing the power of WebAssembly (.wasm)
Stars: ✭ 1,278 (-38.38%)
Mutual labels:  webassembly, wasm
Opus Stream Decoder
Instantly decode Ogg Opus audio streams in chunks with JavaScript & WebAssembly (Wasm)
Stars: ✭ 80 (-96.14%)
Mutual labels:  webassembly, wasm
Draw App
In browser drawing app built in rust / wasm
Stars: ✭ 87 (-95.81%)
Mutual labels:  webassembly, wasm
Lunatic logo

 

Lunatic is a universal runtime for fast, robust and scalable server-side applications. It's inspired by Erlang and can be used from any language that compiles to WebAssembly. You can read more about the motivation behind Lunatic here.

We currently provide libraries to take full advantage of Lunatic's features for:

If you would like to see other languages supported or just follow the discussions around Lunatic, join our discord server.

Supported features

  • Creating, cancelling & waiting on processes
  • Fine-grained process permissions
  • Process supervision
  • Channel based message passing
  • TCP networking
  • Filesystem access
  • Distributed nodes
  • Hot reloading

Installation

We provide pre-built binaries for Windows, Linux and macOS on the releases page.


On macOS you can also use Hombrew:

brew tap lunatic-solutions/lunatic
brew install lunatic

To build the project from source you will need to have rustup installed:

# Add wasm32 compilation target
rustup target add wasm32-unknown-unknown
# Clone the repository
git clone https://github.com/lunatic-solutions/lunatic.git
# Jump into the cloned folder
cd lunatic
# Build and install Lunatic
cargo install --path .

Usage

After installation, you can use the lunatic binary to run WASM modules.

To learn how to build modules, check out language-specific bindings:

Architecture

Lunatic's design is all about spawning super lightweight processes, also known as green threads or go-routines in other runtimes. Lunatic's processes are fast to create, have a small memory footprint and a low scheduling overhead. They are designed for massive concurrency. It's not uncommon to have hundreds of thousands of such processes concurrently running in your app.

Some common use cases for processes are:

  • HTTP request handling
  • Long running requests, like Websocket connections
  • Long running background tasks, like email sending
  • Calling untrusted libraries in an sandboxed environment

Isolation

What makes the last use case possible are the sandboxing capabilities of WebAssembly. WebAssembly was originally developed to run in the browser and provides extremely strong sandboxing on multiple levels. Lunatic's processes inherit these properties.

Each process has its own stack, heap, and even syscalls. If one process fails, it will not affect the rest of the system. This allows you to create very powerful and fault-tolerant abstraction.

This is also true for some other runtimes, but Lunatic goes one step further and makes it possible to use C bindings directly in your app without any fear. If the C code contains any security vulnerabilities or crashes, those issues will only affect the process currently executing the code. The only requirement is that the C code can be compiled to WebAssembly.

It's possible to give per process fine-grained access to resources (filesystem, memory, network connections, ...). This is enforced on the syscall level.

Scheduling

All processes running on Lunatic are preemptively scheduled and executed by a work stealing async executor. This gives you the freedom to write simple blocking code, but the runtime is going to make sure it actually never blocks a thread if waiting on I/O.

Even if you have an infinite loop somewhere in your code, the scheduling will always be fair and not permanently block the execution thread. The best part is that you don't need to do anything special to achieve this, the runtime will take care of it no matter which programming language you use.

Compatibility

We intend to eventually make Lunatic completely compatible with WASI. Ideally, you could take existing code, compile it to WebAssembly and run on top of Lunatic; creating the best developer experience possible. We're not quite there yet.

License

Licensed under either of

at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].