Revery

Reason (OCaml), OpenGL

Web-site https://github.com/revery-ui/revery
Platforms Linux, macOS, Windows
Renderer OpenGL + Flexbox
Download Revery Chat In progress

Start kit https://github.com/revery-ui/revery-quick-start

Tech stack used for building a showcase app:

Build system Esy
Languages ReasonML (OCaml flavour)
Libraries React (Brisk, native re-implementation)
Editor VSCode + Reason plugin

Internals

Revery tries to re-use familar to web developer concepts coming from the OCaml which is a mature language with solid toolchain.

Revery written in Reason and the library you’re using is React: its component model, the way it handles state, JSX and CSS-in-JS (I guess CSS-in-Reason?)

Although there are some difference, for example in JavaScript this is valid JSX:

<Text prop={value}>Sign in with Slack</Text>

in Reason it would be

 <Text prop=value>"Sign in with Slack"</Text>

and so on.

Revery using GLFW.

Developer experience

let textHeaderStyle =
        Style.make(
          ~color=Colors.white,
          ~fontFamily="Lato-Regular.ttf",
          ~fontSize=24,
          ~marginHorizontal=8,
          ~opacity,
          ~transform=[TranslateY(translate)],
          (),
        );

Type system

Reason is more lightweight version of OCaml and it tries to be more friendly to web developers

But it’s still rich functional language with a tons of useful paradigms and nice type system.

Compilation time

Esy works blazingly fast as a build system.

Ecosystem

(these screens temporary)

image

image

https://github.com/facebook/reason/issues/2293

image