Example project setup for Coq that supports git submodule dependencies
  • Python 72.8%
  • Makefile 27.2%
Find a file
2020-02-08 10:01:31 -05:00
src Initial project template and instructions 2018-10-25 12:57:47 -04:00
vendor Initial project template and instructions 2018-10-25 12:57:47 -04:00
.gitignore Update gitignore for Coq 8.11 2020-02-08 10:01:31 -05:00
aviary Ensure aviary install works from a subdirectory 2018-11-20 16:07:16 -06:00
libname Switch to auto-generating _CoqProject 2018-10-25 14:03:53 -04:00
LICENSE.txt Add a license 2018-11-03 09:24:38 -04:00
Makefile Add hook for Coq arguments 2018-11-30 14:49:32 -05:00
README.md Describe aviary in README 2018-11-20 16:02:11 -06:00
travis.yml Build test target in CI 2018-11-08 13:13:32 -05:00

Example Coq project setup

Run aviary init from this repo to set up a new project.

Adding a dependency

To add a library as a dependency, do the following:

  1. Run git submodule add <repo url> vendor/<lib name> from the root of your repo.
  2. Also add any dependencies of your library in the same way.
  3. You can now refer to the library's code prefixed by Libname.

For example, to add the Tactical library you would do:

git submodule add https://github.com/tchajed/coq-tactical vendor/tactical.

Alternately, you can use aviary install tchajed/coq-tactical.

Manual setup

Copy this repo's Makefile and .gitignore. You should put your library's top-level namespace in the file libname (the entire file will be a single word). As a convention we use the CamelCase name of the library.

Your code should go in src (possibly in subdirectories), which is re-mapped in Coq to the top-level namespace given by libname.

For Travis CI, copy travis.yml to .travis.yml and then enable builds from https://travis-ci.org. The default setup builds against the two docker images, coqorg/coq:dev and coqorg/coq:latest, which correspond to a nightly build of master and the latest stable release.

Credits

Many thanks to @anishathalye for helping to work out the design and implementation!

Stability

This setup isn't remotely stable. In particular, we may move away from make and as soon as possible libname will be replaced by a more future proof and extensible configuration file.

Projects using this

Here are some projects where I'm now using this (if you use it, please let me know!):