BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Lapce is a Native Open-Source Code Editor Written in Rust and Supporting Remote Development

Lapce is a Native Open-Source Code Editor Written in Rust and Supporting Remote Development

Written in Rust, Lapce sports a native GUI leveraging GPU acceleration and an extensible plugin system based on WASI. It comes with support for syntax highlighting, code completion, and code diagnostics using any LSP-compliant server.

Lapce supports remote development by allowing you to connect to a remote machine all but giving you the same experience as when you work with a local project. This means you can keep your work environment just the same and take advantage of the full performance of the remote server.

For its native GUI, Lapce builds on the foundations provided by Rust declarative UI toolkit Floem. The layout paradigm used in Floem comes directly from its underlying library Taffy, which provides a Flexbox layout system similar to that offered by CSS. Floem supports Windows, macOS, and Linux, and uses OpenGL, Vulkan, or Metal where available through wgpu.

In addition to providing a declarative syntax, Floem fosters a reactive model, where signals are sent across the app to produce UI updates. To keep rendering performance under control, Floem renders the view tree only once to avoid bottlenecks in individual views.

To enable remote development support, Lapce uses an approach based on a proxy, the lapce-proxy, which is in charge of the communication between the frontend and the rest of the components of the editor, including the file system, plugins, and LSP servers. When developing against a remote server, the frontend connects to a remote proxy, while it uses a local proxy for local development, with no discernible change for the user apart from network latency.

As mentioned, Lapce supports external plugins, which can be created using any language that can generate WASI-compatible Wasm. Documentation about creating plugins is still scarce, but you can head to the Lapce Community repo to have a look at a few plugins and get started creating your own using a template.

As a final note, which will be welcome to all Vim lovers, Lapce offers a Vim-like editing experience based on two distinct modes. This can be enabled from Lapce main screen or the settings panel.

About the Author

Rate this Article

Adoption
Style

BT