Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 2.37 KB

Backends.md

File metadata and controls

59 lines (36 loc) · 2.37 KB

Supported Backends

Table of Contents
  1. Selecting a Backend
  2. Ncurses
  3. Crossterm

Selecting a Backend

By default, Tuile uses ncurses on Linux and macOS, and crossterm on Windows.

To select another backend, pass an option to Build.dependency in build.zig:

const tuile = b.dependency("tuile", .{ .backend = <backend name> })

Ncurses

To be able to use ncurses backend, ncurses must be installed and available as system library.

Tuile was tested with ncurses 5.7, but other versions should work regardless.

  • macOS

    A version of ncurses should already be installed in your system (or is it shipped with XCode and the command line tools?), so you don't have to do anything.

  • Linux

    sudo apt-get install libncurses5-dev libncursesw5-dev
  • Windows

    Prebuilt binaries are available on the official website.

(back to top)

Crossterm

Crossterm is a pure-rust, terminal manipulation library. It supports all UNIX and Windows terminals down to Windows 7 (not all terminals are tested, see Crossterm's Tested Terminals for more info).

Tuile uses Crossterm v0.27 which has a minimum requirement of Rust v1.58.

Follow here to download and install Rust.

A word on Windows

By default Rust targets MSVC toolchain on Windows which makes it difficult to link against from Zig. For that reason, Tuile targets windows-gnu toolchain and does some (albeit small) crimes during linking. See build.crab description if you want to know more.

Nevertheless, Tuile is designed to be plug and play, and you should be able to just use it without worrying too much about what happens internally. If you face any problems, please submit a bug report.

(back to top)