A native Rust SDK for block-based document editors.
WYSIWYM engine with realtime collaboration on Loro, and a GPUI WYSIWYG editor — no browser, no WebView.
Website · Docs · Architecture
Lotype is named after the line-o'-type machine, which cast an entire line of text as one solid slug of metal instead of setting it letter by letter. Lotype handles documents the same way: as solid blocks.
The SDK grew out of an editor built on Tauri + React + Tiptap/BlockNote. Two problems in that stack could not be fixed from inside it:
- The browser engine differs on every OS. Tauri uses whatever WebView the OS ships (WKWebView, WebView2, WebKitGTK). Even ProseMirror carries dozens of per-browser workarounds, most of them in IME, selection and keyboard handling, which is the heart of an editor.
- The layers patch each other. BlockNote imposes a block model with IDs on top of ProseMirror's position-based text tree. Each block becomes three wrapper nodes, IDs are re-applied after every transaction, and helpers keep translating positions to blocks. Every upgrade of a lower layer can break the layer above it.
Lotype replaces that stack with a single native one:
lotype-coreplays the role of ProseMirror + Yjs. Blocks with stable IDs are the native data model, built on the Loro CRDT.lotype-uiplays the role of Tiptap + BlockNote. It renders straight to the GPU through GPUI.
There is no DOM, no WebView and no patching layer in between.
The first release targets Rust/GPUI applications on macOS (Intel and Apple Silicon). See ARCHITECTURE.md for the design and its trade-offs.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Lotype by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.