Meta build system -- work in progress
Python C HTML Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.

The Craftr build system

Craftr is a modular build system that has evolved from regular Python scripts to a Domain Specific Language and has recently been inspired by Buck, CMake and QBS. It uses Ninja as its build backend by default, but extensions can implement compatibility with other builders.
Craftr runs on CPython 3.3 or higher.


Craftr 3 is in alpha and not currently available on PyPI. You can however install it directly from the Git repository.

pip3 install git+

What does it look like?

Craftr is supposed to be an ergonomic tool that should be easy to use and is yet powerful and easy to extend/customize.

project "myproject"
using "cxx"
target "main":
  cxx.srcs = ['main.c']

Run as craftr -cb

project "myproject"
using "cxx"
target "main":
  cxx.srcs = ['main.cpp']

Run as craftr -cb

project "csharp_helloworld"
using "csharp"
target "main":
  csharp.srcs = glob('src/*.cs')
  csharp.packages = ['Newtonsoft.JSON:10.0.3']
  csharp.bundle = True

Run as craftr -cb main:csharp.runBundle

project "java_helloworld"
using "java"
target "main":
  java.srcs = glob('src/**/*.java')
  java.artifacts = [
  java.mainClass = 'Main'
  java.bundleType = 'merge'  # Or 'onejar'

Run as craftr -cb main:java.runBundle

project "haskell_helloworld"
using "haskell"
target "main":
  haskell.srcs = ['src/Main.hs']

Run as craftr -cb

project "ocaml_helloworld"
using "ocaml"
target "main":
  ocaml.srcs = ['src/']
  # False to produce an OCaml bytecode file
  ocaml.standalone = True

Run as craftr -cb

project "vala_helloworld"
using "vala"
target "main":
  vala.srcs = ['src/Main.vala']

Run as craftr -cb

project "cython_helloworld"
using "cython"
target "main":
  cython.srcs = glob('src/*.pyx')
  cython.main = 'src/Main.pyx'

Run as craftr -cb

Copyright © 2015-2018   Niklas Rosenstein