Need help with limn?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

christolliday
407 Stars 19 Forks Other 648 Commits 19 Opened issues

Description

Experimental cross platform GUI library

Services available

!
?

Need anything else?

Contributors list

# 140,033
Rust
linear-...
constra...
D
602 commits
# 6,677
Less
React
ant-des...
imgui
15 commits
# 19,675
Rust
Shell
C
rust-li...
8 commits
# 52,748
Elixir
zig
element...
pony-la...
3 commits
# 770,770
Rust
2 commits
# 22,672
Less
kotlin-...
packets
gitlab-...
1 commit
# 14,815
rust-la...
intelli...
imagema...
hackerr...
1 commit
# 23,634
aws-s3
Apache ...
bucket
awk
1 commit

Limn

Build Status Build status

Documentation

WARNING: Has primarily been tested on X11, serious bugs exist and all APIs are likely to change. Code is underdocumented and prototype quality, you probably don't want to use this (yet).

An early stage, experimental, cross platform GUI library written in Rust.

Limn uses webrender for rendering, cassowary for layout, and winit/glutin for window handling.

Motivation

To improve the state of GUI programming in Rust, by providing a relatively low level, high performance library for constructing GUIs, with a focus on composability, extensibility and minimal boilerplate.

Limn aims to have a relatively small, easy to learn core API for defining components, intended as a DOM like API but with fewer implicit costs. For this reason Limn at its core is implemented as a retained, mutable widget tree rather than modelling UI state as a function of application state, which could eventually be implemented on top, with diffing and a virtual DOM like tree representation.

The long term goal is to make it possible to use components written in multiple paradigms and multiple languages in a single application with a common API. So that for instance, you could use compiled Rust for optimized primitive components alongside an interpreted language with functional component definitions (JSX) when possible, or just for top level components or prototyping.

For now however, the focus is on making the core (layout, styling etc.) stable, performant and reliable.

Limn also aims to fill some gaps in the Rust GUI ecosystem by providing functionality as separate crates when possible, so that they can (eventually) be useful to other GUI libraries, frameworks or applications, with or without limn. Currently these include

limn-layout
and
limn-text-layout
.

Screenshots

screenshot

Running examples under NixOS

winit needs X11 libraries at runtime. To get them on NixOS, you can create a

default.nix
file with the following content:
with import  {}; {
  cargoEnv = stdenv.mkDerivation {
    name = "limn";
    shellHook = with xorg; ''
      export LD_LIBRARY_PATH=/run/opengl-driver/lib/:${lib.makeLibraryPath (with xorg; [libX11 libXcursor libXxf86vm libXi libXrandr xinput zlib])}
    '';
  };
}

then, running example should work as

$ nix-shell --run bash
$ cargo run --release --example crud

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.