import a subset of ninja source code