// SPDX-FileCopyrightText: 2022 Shun Sakai
//
// SPDX-License-Identifier: CC-BY-4.0

= How to Build

== Prerequisites

.To build *qrtool*, you will need the following dependencies
* https://doc.rust-lang.org/stable/cargo/[Cargo] (v1.85.0 or later)

.To build man pages, you will need the following additional dependencies
* https://asciidoctor.org/[Asciidoctor]

== Building from source

.To clone the repository
[source,sh]
----
git clone https://github.com/sorairolake/qrtool.git
cd qrtool
----

.To build a package
[source,sh]
----
just build
----

.To build man pages
[source,sh]
----
just build-man
----

The man pages are generated in `docs/man/man1`.

== Crate features

`decode-from-bmp`::

  Enable decoding from the BMP image. This is enabled by default.

`decode-from-dds`::

  Enable decoding from the DDS image. This is enabled by default.

`decode-from-exr`::

  Enable decoding from the OpenEXR image. This is enabled by default.

`decode-from-ff`::

  Enable decoding from the Farbfeld image. This is enabled by default.

`decode-from-gif`::

  Enable decoding from the GIF image. This is enabled by default.

`decode-from-hdr`::

  Enable decoding from the Radiance RGBE image. This is enabled by default.

`decode-from-ico`::

  Enable decoding from the ICO image. This is enabled by default.

`decode-from-jpeg`::

  Enable decoding from the JPEG image. This is enabled by default.

`decode-from-pnm`::

  Enable decoding from the PNM image. This is enabled by default.

`decode-from-qoi`::

  Enable decoding from the QOI image. This is enabled by default.

`decode-from-svg`::

  Enable decoding from the SVG image. This is enabled by default.

`decode-from-tga`::

  Enable decoding from the TGA image. This is enabled by default.

`decode-from-tiff`::

  Enable decoding from the TIFF image. This is enabled by default.

`decode-from-webp`::

  Enable decoding from the WebP image. This is enabled by default.

`decode-from-xbm`::

  Enable decoding from the XBM image. This is enabled by default.

`optimize-output-png`::

  Enable options to optimize output PNG image. This is enabled by default.

`output-as-ansi`::

  Enable output using ANSI escape sequences. This is enabled by default.
