mustache-c is a basic implementation of mustache templating in pure C.
Supported:
- Sleek pure C API
- Prerendering for better speed
- Sections and variables
Not supported:
- Partials
- HTML escaping
- Custom delimiters
Simply use the configure script to compile and install mustache-c:
On GNU/Linux distributions:
$ ./configure --prefix=/usr
$ make
$ sudo make installOn FreeBSD:
$ ./configure --prefix=/usr/local
$ make
$ sudo make installmustache-c requires flex, bison and reasonable modern C
library that provides stdint.h. If you wish to build the doxygen
documentation you will also need doxygen.
mustache-c provides a pkg-config file with which you can determine
libraries and include paths:
$ pkg-config --libs mustache_c-1.0
$ pkg-config --cflags mustache_c-1.0This also allows mustache-c to be picked up by cmake:
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(MUSTACHEC REQUIRED mustache_c-1.0)There is a test program available in the source which shows the basic usage of mustache-c.
See this link for the Doxygen documentation of the API.