Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Generates ObjC header files to classes and categories defined in Nu.
Branch: master

Updates the Nukefile to work better, adds the flag to nug that allows…

… the user to specify a different regular expression to match nu files, and updates the documentation to reflect this new flag.
latest commit 958f2eaf4c
Grayson Hansard authored



nug generates ObjC header files from Nu files. This is handy when integrating Nu and Objective-C in the same project. This is based on a request in the Nu mailing list.


Open the Terminal and navigate to the nug directory using the command line. Then do the following:

  1. nuke
  2. nuke install
  3. nuke clobber

The above should compile nug, install it into /usr/local/bin/, and then delete the generated files. If you'd prefer to compile nug by hand, you can do the following:

  1. nubake the nu file using: nubake -s
  2. Compile into a program using: gcc nug.m -o nug -framework Cocoa -framework Nu
  3. Install the compiled nug where you normally put executables


Navigate to a folder with a "nu" folder (but don't go into the "nu" folder) using the Terminal. Run nug in the Terminal. nug will create a "nug" folder (if one doesn't already exist) and create header files based on information found in the nu folder.

By default, nug only reads the files that are in the "nu" folder. You can change this by using the -fre flag. -fre stands for "file regular expression." Any files that match that regular expression will be converted using nug. For instance, if you want to create headers for files in a "nu" and a "src" folder, you can use `nug -fre "^(nu|src).*.nu".


Grayson Hansard
From Concentrate Software

Something went wrong with that request. Please try again.