nimbus/docs/getting-started.rst

1.3 KiB

Getting Started

Note

Make sure the project you want to build uses NimScript package file format. INI format is deprecated and not supported by nimbus.

Setup

bash

cd my-nim-project mkdir build && cd build nimbus ..

This command will create a ninja.build file in the build directory.

nimbus.1 manual page

All the following commands need to be called from the build directory.

Compile

bash

ninja

This command will build all project binaries, if any. If there are multiple, you can choose which to build:

bash

ninja myprog

Run tasks

A ninja target is created for every Nimble task. You can run them on request:

bash

ninja scss

Run tests

bash

ninja test

This command will run "test" task (if defined). Otherwise, it will compile and run all Nim files in the tests directory beginning with "t" in their filename.

This behavior is compatible with Nimble.

Install

bash

DESTDIR=/tmp/prefix ninja install

This command will install the package (both sources and binaries) into /tmp/prefix.