GithubHelp home page GithubHelp logo

x86-64 / mustache-c Goto Github PK

View Code? Open in Web Editor NEW
47.0 7.0 7.0 647 KB

Mustache templates implementation in pure c

License: GNU Lesser General Public License v3.0

C 49.93% Shell 3.04% Makefile 3.27% M4 5.25% Lex 4.12% Yacc 34.39%

mustache-c's Introduction

Overview

mustache-c is a basic implementation of mustache templating in pure C.

Features

Supported:

  • Sleek pure C API
  • Prerendering for better speed
  • Sections and variables

Not supported:

  • Partials
  • HTML escaping
  • Custom delimiters

Installation

Simply use the configure script to compile and install mustache-c:

$ ./configure --prefix=/usr
$ make
$ sudo make install

mustache-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.0

This also allows mustache-c to be picked up by cmake:

FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(MUSTACHEC REQUIRED mustache_c-1.0)

Usage

There is a test program available in the source which shows the basic usage of mustache-c.

API Documentation

See this link for the Doxygen documentation of the API.

mustache-c's People

Contributors

n0la avatar smspillaz avatar steve-chavez avatar volyrique avatar x86-64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mustache-c's Issues

const awareness in API

Some functions signatures would benefit from having some of their parameters declared const. These include:

  • buffer in mustache_api_write
  • error in mustache_api_error

It is especially important (imho) for write, as sometimes you have to explicitly cast the const away on static buffers when calling write as seen here.

This breaks API, as existing code that already casts will break; but it would make code overall cleaner. ABI is not broken.

I wanted to bring this up in an issue first before making a merge request for it. What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.