nimbus/docs/getting-started.rst

72 lines
1.3 KiB
ReStructuredText
Raw Permalink Normal View History

2022-11-13 14:27:41 +00:00
.. SPDX-FileCopyrightText: 2022 Anna <cyber@sysrq.in>
..
.. SPDX-License-Identifier: BSD-3-Clause
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
-----
.. prompt:: bash
cd my-nim-project
mkdir build && cd build
nimbus ..
This command will create a :file:`ninja.build` file in the build directory.
.. seealso:: :manpage:`nimbus.1` manual page
All the following commands need to be called from the build directory.
Compile
-------
.. prompt:: bash
ninja
This command will build all project binaries, if any. If there are multiple, you
can choose which to build:
.. prompt:: bash
ninja myprog
Run tasks
---------
A ninja target is created for every Nimble task. You can run them on request:
.. prompt:: bash
ninja scss
Run tests
---------
.. prompt:: bash
ninja test
This command will run "test" task (if defined). Otherwise, it will compile and
2024-01-11 04:47:01 +00:00
run all Nim files in the :file:`tests` directory beginning with "t" in their
2022-11-13 14:27:41 +00:00
filename.
This behavior is compatible with Nimble.
Install
-------
.. prompt:: bash
DESTDIR=/tmp/prefix ninja install
This command will install the package (both sources and binaries) into
:file:`/tmp/prefix`.