louvre

Nim bindings for Louvre

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.1.2
License LGPL-2.1-or-later
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:27

Authors

  • xTrayambak

Installation

nimble install louvre
choosenim install louvre
git clone https://github.com/xTrayambak/nim-louvre

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
louvre - - - - - - -

Dependencies

Package Version Optional
nim >= 2.0.0 No
cppstl >= 0.7.0 No

Source

Repository https://github.com/xTrayambak/nim-louvre
Homepage https://github.com/xTrayambak/gbm-nim
Registry Source nimble_official

README

nim-louvre

This package provides bindings for Louvre, a library for writing Wayland compositors.

Currently, this is the only way to write a Wayland compositor with Nim. Louvre is powerful when needed, but it does a lot of hand-holding otherwise. You can get a compositor running in just a few lines of code.

minimal example

The following code starts a compositor that works.

import pkg/cppstl/std_smartptrs,
       pkg/louvre

proc main() =
  putEnv("LOUVRE_WAYLAND_DISPLAY", "louvre-display")

  var compositor = makeUnique(Compositor)
  echo "using Louvre " & $compositor.getVersion()

  if not compositor.start():
    echo "the compositor couldn't init :("
    quit(1)

  while compositor.getState() != CompositorState.Uninitialized:
    compositor.processLoop(-1)

  echo "bye bye!"

when isMainModule:
  main()

Now, you can just compile this program and run any program by setting the WAYLAND_DISPLAY environment variable to louvre-display to force it to connect to your test compositor.