A fast and secure WebAssembly and WASI runtime for Elixir, enabling lightweight WebAssembly containers in your backend.
Wasmex is a WebAssembly and WASI runtime for Elixir that enables developers to execute lightweight WebAssembly containers within their Elixir backend. It provides a secure, sandboxed environment for running user-provided code and facilitates sharing business logic across different programming language ecosystems. The project leverages the wasmtime runtime for fast, near-native execution of WebAssembly binaries.
Elixir backend developers who need to safely execute untrusted code, integrate WebAssembly modules, or share logic with systems written in other languages like JavaScript, Rust, or C/C++. It is also suitable for teams building cross-language applications where WebAssembly serves as a common compilation target.
Developers choose Wasmex for its secure sandboxing, which isolates WebAssembly execution in a memory-safe environment ideal for untrusted code, and its seamless integration with the Elixir ecosystem via a simple Elixir API. Its use of wasmtime ensures high performance, while WASI support enables system-level interactions, making it a robust solution for embedding WebAssembly in Elixir backends.
Execute WebAssembly from Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages the wasmtime runtime to execute WebAssembly binaries at near-native speed, as emphasized in the key features for fast execution.
Provides a memory-safe, isolated execution environment ideal for running untrusted code, ensuring safety per WebAssembly's design principles highlighted in the README.
Supports the WebAssembly System Interface, enabling modules to perform system-level interactions, broadening use cases for backend integrations.
Offers a straightforward Elixir API with functions like Wasmex.start_link and call_function, making it easy to load and interact with WebAssembly modules, as shown in the example.
Setting up the environment requires installing Rust, multiple toolchains, and managing ENV variables, which adds overhead compared to pure Elixir projects, as detailed in the Development section.
At version 0.14.0, the project may undergo breaking changes, potentially affecting production deployments and requiring careful version management.
For basic function calls, the sandboxing and data serialization between Elixir and WebAssembly can introduce latency, making it less efficient than native Elixir code for trivial operations.