notcurses

A low-level Nim wrapper for Notcurses: blingful TUIs and character graphics


Keywords
cli, library, tui, animation, character, color, console, emoji, graphics, multimedia, nim, terminal, unicode
License
Apache-2.0
Install
nimble install notcurses

Documentation

nim-notcurses

License: Apache License: MIT Stability: experimental

A low-level Nim wrapper for Notcurses: blingful TUIs and character graphics.

The wrapper builds and exposes Notcurses' raw C API via nimterop.

🚧 Under construction 🚧

The wrapper may need significant fine-tuning for Notcurses to be fully usable and for Nim programs using the wrapper to be stable. Please keep that in mind if you decide to experiment with nim-notcurses.

Requirements

Same as Notcurses' requirements.

Usage

import notcurses

Or import the minimal core:

import notcurses/core

For direct mode:

import notcurses/direct

Or import its minimal core:

import notcurses/core/direct

Compiling

Make sure to pass the desired options to nimterop:

$ mkdir -p build
$ nim c \
  -d:notcursesDl \
  -d:danger -d:strip --hints:off --opt:size --passC:-flto --passL:-flto \
  --outdir:build \
  examples/hello_direct.nim

$ build/hello_direct

-d:notcursesDl configures nimterop to download Notcurses' sources from GitHub. There are additional options that can be set; see nimterop's README and the {.strdefine.} constants in e.g. notcurses.nim and notcurses/includes/generator_top.nim.

For information on how to work with Notcurses, see its Usage doc.

In time, this repo will likely provide guidance specific to programming with the wrapper, and it may eventually supply a more Nim-oriented API that is backed by the wrapper.

Versioning

This library follows the version number of Notcurses:

License

Wrapper license

nim-notcurses is licensed and distributed under either of:

at your option. The contents of this repository may not be copied, modified, or distributed except according to those terms.

Dependency license

Notcurses is licensed under the Apache License, Version 2.0.