| 1 |
Librsvg as a product |
| 2 |
==================== |
| 3 |
|
| 4 |
A full build of librsvg produces several *artifacts*, which are the |
| 5 |
final "products" that are produced from the build. We will discuss |
| 6 |
them in three groups: library artifacts, ``rsvg-convert`` artifacts, |
| 7 |
and others. |
| 8 |
|
| 9 |
|
| 10 |
Library artifacts |
| 11 |
----------------- |
| 12 |
|
| 13 |
Librsvg is part of the `GNOME platform libraries |
| 14 |
<https://developer.gnome.org/documentation/introduction/overview/libraries.html>`_, |
| 15 |
and needs to maintain a C-compatible API with ABI stability across versions. |
| 16 |
|
| 17 |
The build produces these artifacts, which are typical of GNOME libraries that |
| 18 |
can be used from C and other languages: |
| 19 |
|
| 20 |
- A shared library ``librsvg-2.so`` (the file extension will be |
| 21 |
different on MacOS or Windows). This is usually installed as part |
| 22 |
of the system's libraries. For example, the GTK toolkit assumes |
| 23 |
that librsvg's library is installed in the system, and uses it to |
| 24 |
load SVG assets like icons. Applications can generally link to this |
| 25 |
library and load SVG documents for different purposes. |
| 26 |
|
| 27 |
- A group of C header files (``*.h``) that will be installed in the |
| 28 |
system's location for header files. C and C++ programs can use |
| 29 |
these directly. |
| 30 |
|
| 31 |
- A ``librsvg-2.pc`` file for `pkg-config |
| 32 |
<https://www.freedesktop.org/wiki/Software/pkg-config/>`_. This lets |
| 33 |
compilation scripts find the location of the installed library and |
| 34 |
header files. |
| 35 |
|
| 36 |
- ``.gir`` and ``.typelib`` files for `GObject Introspection |
| 37 |
<https://gi.readthedocs.io/en/latest/>`_. These are machine-readable |
| 38 |
descriptions of the API/ABI in the ``.so`` library, which are used by |
| 39 |
language bindings to make librsvg's functionality available to many |
| 40 |
programming languages. |
| 41 |
|
| 42 |
- A ``.vapi`` description of the API for the `Vala language |
| 43 |
<https://vala.dev/>`_ compiler. |
| 44 |
|
| 45 |
Rust API |
| 46 |
^^^^^^^^ |
| 47 |
|
| 48 |
Apart from the C-compatible library, the Rust code for the library |
| 49 |
defines a ``librsvg`` crate that can be used by Rust programs. Since |
| 50 |
version 2.57.0, librsvg is available as a regular crate in |
| 51 |
``crates.io``. |
| 52 |
|
| 53 |
|
| 54 |
``rsvg-convert`` artifacts |
| 55 |
-------------------------- |
| 56 |
|
| 57 |
``rsvg-convert`` is a command-line tool to render SVG documents to |
| 58 |
various output formats. It is a very widely-used tool, and many |
| 59 |
scripts and systems depend on it maintaining a stable set of |
| 60 |
command-line options. |
| 61 |
|
| 62 |
The build produces these: |
| 63 |
|
| 64 |
- The ``rsvg-convert`` executable. This is the tool that most |
| 65 |
end-users interact with. |
| 66 |
|
| 67 |
- A Unix manual page for ``rsvg-convert(1)``. |
| 68 |
|
| 69 |
|
| 70 |
Other artifacts |
| 71 |
--------------- |
| 72 |
|
| 73 |
- A ``libpixbufloader-svg.so`` module for `gdk-pixbuf |
| 74 |
<https://docs.gtk.org/gdk-pixbuf/>`_. This allows programs to use |
| 75 |
the gdk-pixbuf API to load SVG documents, as if they were raster |
| 76 |
files like JPEG or PNG. |
| 77 |
|
| 78 |
- A ``librsvg.thumbnailer`` configuration file, to tell GNOME's |
| 79 |
thumbnailing mechanism that it can just use gdk-pixbuf when trying |
| 80 |
to create a thumbnail for an SVG file. These thumbnails can then |
| 81 |
get displayed in file managers. |
| 82 |
|
| 83 |
- `Documentation for the C API |
| 84 |
<https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/index.html>`_, |
| 85 |
published online and also installed on the system in a place where |
| 86 |
GNOME's `DevHelp <https://gitlab.gnome.org/GNOME/devhelp>`_ can find |
| 87 |
it. |
| 88 |
|
| 89 |
- `Documentation for the Rust API |
| 90 |
<https://gnome.pages.gitlab.gnome.org/librsvg/doc/rsvg/index.html>`_, |
| 91 |
published online. This is not built from the normal ``make`` process, |
| 92 |
but independently as part of the :doc:`ci` pipeline. |
| 93 |
|
| 94 |
- The rendered HTML version of this development guide. This is not |
| 95 |
built from the normal ``make`` process, but independently as part of |
| 96 |
the :doc:`ci` pipeline. |