README.md
1# C++ HOCON Parser
2
3![Travis CI](https://travis-ci.org/puppetlabs/cpp-hocon.svg)
4![Appveyor](https://ci.appveyor.com/api/projects/status/github/puppetlabs/cpp-hocon?svg=true)
5
6
7
8This is a port of the TypesafeConfig library to C++.
9
10The library provides C++ support for the [HOCON configuration file format](https://github.com/typesafehub/config/blob/master/HOCON.md).
11
12```
13 MMMMMMMMMMMMMMMMMMMM
14 .====================.
15 MMMMMMMMMMMMMMMMMMMMMM
16 .MMMMMMMMMMMMMMMMMMMMMM.
17 ===.7MMMIN7NMMMMMMMMM7M=MMMM,===
18 MMM.7MM: DMMMMM7 :MMM=MMM
19 MMM.7MM, DMMMMM? ~MMM=MMM
20 MMM.7MMM~++~?MMMMMMM~++~MMMM=MMM
21 .MMMMMMMMMMMMMMMMMMMMMM.
22 MMMMMMMMMMMMMMMMMMMMMM
23 MMMMMMMMMMMMMMMMMMMMMM
24 MMM HOCON MMM
25 MMMMMMMMMMMMMMMMMMMMMM
26 .MMMMMMMMMMMMMMMMMM.
27 .MMMMMMMMMMMMMMMMMM.
28 .MMMMMMMMMMMMMMMMMMMMMMMM
29 . MMMMMMMMMMMMM88MMMMMMMMMM8MM .
307=MMMMMMMM++ A CONFIG FILE ++M8MMMMMM7=
31M=MMMMMMMM+ FORMAT DESIGNED +M8MMMMMM7M
32M=MMMMMMMM++ FOR HUMANS ++M8MMMMMM7M
33 =MMMMMMMMMMMMMMMMM88MMMMMMMMMM8MMMMMM7
34 7MM.88MMMMMMMMMMM88MMMMMMMMMMO88 MM8
35 7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
36 7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
37 7MM MMMDMMMM?MM88MM?MMMMOMM8 MM8
38```
39
40## Caveats
41
42This is a mostly complete implementation of the HOCON format. It currently has some known limitations
43
44* Include requires the location specifier, i.e. `include "foo"` won't work but `include file("foo")` will. URL is not yet implemented, and classpath won't be supported as it makes less sense outside of the JVM.
45* Unicode testing is absent so support is unknown. There are likely things that won't work.
46
47
48## Build Requirements
49
50* OSX or Linux
51* GCC >= 4.8 or Clang >= 3.4 (with libc++)
52* CMake >= 3.2.2
53* Boost Libraries >= 1.54
54* [Leatherman](https://github.com/puppetlabs/leatherman)
55
56
57## Pre-Build
58
59Prepare the cmake release environment:
60
61 $ mkdir release
62 $ cd release
63 $ cmake ..
64
65
66Optionally, also prepare the debug environment:
67
68 $ mkdir debug
69 $ cd debug
70 $ cmake -DCMAKE_BUILD_TYPE=Debug ..
71
72
73## Building
74
751. Enter your build environment of choice, i.e. `cd release` or `cd debug`
762. `make`
773. (optional) install with `make install`
78
79## Testing
80
81Run tests with `make test`.
82