Zaplib is in alpha, but it's rapidly improving. If you want to use this library in production, please say hi in our Slack, so we can work with you on the integration. Don't be shy — please reach out if you run into any issues at all 😄
The following demo (including the text!) is fully rendered within Zaplib: using Rust, in a Web Worker, and using our custom 2d rendering engine. We render the Zaplib lightning bolt logo, with draggable control points, and a live editable shader (in a fully Rust-based editor originally built by the Makepad folks). Try changing
LINE_BASE_LENGTH. It's best viewed on desktop in a modern browser. For more demos, check out demos.
Zaplib roughly consists of these parts:
- Standard Library - logging, threading, HTTP, reading files, etc.
- JS bridge - communicating data between JS and Rust.
- Rendering - low-level GPU-based 2d and 3d rendering APIs, and eventing.
- UI - components, layout engine, animation.
Current development is focused on 1 - 3. In the future we aim to support building entire applications fully within Zaplib.
Zaplib supports the following build targets:
- WebAssembly / WebGL - Tested on modern Chrome. Known issues in Firefox, Edge, Safari.
- Mac OS X / Metal - Tested on 11.6 Big Sur.
- Linux / OpenGL - Not well supported. Some APIs missing, but should run.
- Windows / DirectX 11 - Currently broken... sorry!
- Zapium - Zaplib's equivalent of Electron. Highly experimental.
Currently our main focus is Web Assembly / WebGL support, and native targets are mostly used for a faster development cycle. (Compiling Rust to native is faster than to WebAssembly.)
The open source core team consists of:
Also a big shoutout to the Makepad folks, whose open source framework we originally forked and with whom we've had a fruitful collaboration ever since.
Zaplib is distributed under the terms of both the MIT license and the Apache License (version 2.0).
LICENSE-MIT in the repo root for details. Third party license notices are available in
We're currently exploring how to make a sustainable company around Zaplib. We hope and expect to keep the vast majority of code open source, but there is a possibility that some parts of this repo (such as Zapium for example) move to a source-available but more restrictive license in the future. The trust of the open source community is our biggest asset, so we'd always be very careful and communicative about such decisions.