Skip to content

guruofquality/libbson

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libbson

libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. It is a useful base for those wanting to write high-performance C extensions to higher level languages such as python, ruby, or perl.

Building

Dependencies

Fedora / RedHat Enterprise / CentOS

yum install git automake autoconf libtool gcc

Debian / Ubuntu

apt-get install git-core automake autoconf libtool gcc

FreeBSD

pkg install git automake autoconf libtool gcc pkgconf

SmartOS

pkgin install git automake autoconf libtool gcc47 gmake pkg-config
export PATH=/opt/local/gcc47/bin:$PATH

Windows Vista and Higher

Builds on Windows Vista and Higher require cmake to build Visual Studio project files. Alternatively, you can use cygwin or mingw with the automake based build.

git clone git://github.com/mongodb/libbson.git
cd libbson
cmake.exe .
msbuild.exe ALL_BUILD.vcxproj

For the adventurous, you can cross-compile for Windows from Fedora easily using mingw.

./configure --host=x86_64-w64-mingw32

From Git

$ git clone git://github.com/mongodb/libbson.git
$ cd libbson/
$ ./autogen.sh
$ make
$ sudo make install

You can run the unit tests with

make test

From Tarball

tar xzf libbson-$ver.tar.gz
./configure --enable-silent-rules
make
sudo make install

Optimizations

You may want to enable optimizations in libbson. You can do this during configure with:

./configure --enable-optimizations

Hardening

You may want to enable stack protector and other binary hardening features. You can do this with:

./configure --enable-hardening

Developing using libbson

In your source code:

#include <bson.h>

To get the include path and libraries appropriate for your system.

gcc my_program.c $(pkg-config --cflags --libs libbson-1.0)

Examples

See the examples/ directory for how to use the libbson library in your application.

Documentation

See the doc/ directory for documentation on individual types.

About

A BSON utility library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 97.7%
  • C++ 1.1%
  • Other 1.2%