// SPDX-FileCopyrightText: 2022 Shun Sakai
//
// SPDX-License-Identifier: Apache-2.0 OR MIT

= How to Build

== Prerequisites

.To build *qrtool*, you will need the following dependencies
* https://doc.rust-lang.org/stable/cargo/[Cargo] (v1.74.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 find the directory where man pages are generated
[source,sh]
----
fd -t directory out ./target/*/build/qrtool-*
----

== 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-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-exr`::

  Enable decoding from the OpenEXR 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-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-svg`::

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

`optimize-output-png`::

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