All Projects → zhchbin → DN

zhchbin / DN

Licence: other
Distributed Ninja

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Protocol Buffer
295 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Distributed Ninja

Build Status

DN, which is short for Distributed Ninja, aims to finish the time consuming compilation job with several machines. Unlike distcc or icecream, DN is based on ninja, and supports platforms: Linux and Windows. Ninja is a small build system with a focus on speed, it is born from @martine's work on the Chromium browser project.

NOTE: currently this project is only a proof of concept.

Usage

  • Master

    $ dn --working_dir=/path/to/your/project
  • Slave

    $ dn --working_dir=/path/to/your/project --master=<master_ip>

Build

  1. Clone the repository and submodule.

    $ git clone https://github.com/zhchbin/DN.git
    $ cd DN && git submodule update --init
  2. Install gyp.

    $ git clone https://github.com/svn2github/gyp
    $ cd gyp
    $ echo export PATH='$PATH':`pwd` >> ~/.bashrc && source ~/.bashrc
  3. Install ninja.

    $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    $ echo export PATH=`pwd`/depot_tools:'$PATH' >> ~/.bashrc
    $ echo export GYP_GENERATORS=ninja >> ~/.bashrc && source ~/.bashrc
  4. Generate ninja build files and build

    $ sudo apt-get install libcurl4-openssl-dev
    $ gyp --depth=. -I base/src/build/common.gypi
    $ ninja -C out/Debug

What I have done?

  1. Pull out useful low-level ("base") routines routines from the Chromium open-source project at http://www.chromium.org, see chromium-base.
  2. RPC componment based on Google/protobuf, see src/net and src/rpc. Usage demo can be found here.
  3. Integrate ninja code into the our thread model, and dispatch compilation command from master to slave.

License

DN's code in this repo uses the BSD license, see our LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].