revery-terminal
revery-terminal copied to clipboard
Barebones terminal emulator built with ReasonML + Revery + libvterm
revery-terminal
A terminal emulator built with Revery.
This is a barebones terminal emulator factored out from the work to include a terminal emulator in Onivim 2.
It's also a fun exploration in leveraging an Elm-style architecture in a natively compiled application.

Pre-requisites
- Make sure to install the dependencies needed for Revery
- OSX: You'll also need
glibtool(brew install libtool)
Building
npm install -g [email protected]esy installesy build
Running
esy run
Limitations
This is just meant as an exploration, and isn't production-ready. In particular, there are some pieces missing:
- No Unicode support at the moment - assumes ASCII rendering
- No ligatures or text shaping
- No Windows support at the moment - we use the
openptyAPI which is not available on Windows - Minimal keys are handled
These would all be great contribution opportunities, though!
Source Overview
Main modules
src/bin/App.re- this is the entry point for the application (where we start the window, wire up our store).src/bin/Model.re- this is the heart of our application - that provides the definition ofModel.tas well as how it changes over time (by providing anupdaterfunction).
Supporting modules
src/lib/ReveryTerminal.rei- contains cross-platform utilities for working with a terminal.src/pty- small OCaml binding to theopenptysystem call, to create a pseudoterminal.
Technologies Used
- Revery to provide the window management and drawing functionality.
- reason-libvterm bindings for libvterm
- isolinear as an Elm-like applicatiion management framework.
We also use the JetBrains Mono font.
License
MIT