Skip to content

Support building with dune - #11

Draft
chandradeepdey wants to merge 1 commit into
arthuraa:masterfrom
chandradeepdey:dune
Draft

chandradeepdey wants to merge 1 commit into
arthuraa:masterfrom
chandradeepdey:dune

Conversation

@chandradeepdey

Copy link
Copy Markdown
Contributor
  • following std++/Iris dune scripts

Copilot AI review requested due to automatic review settings June 9, 2026 17:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the build/dependency tooling to support multi-package builds (main library + examples) and introduces dune/Rocq project-file generation helpers.

Changes:

  • Add a per-package build/install helper (make-package) and switch opam build/install commands to use it.
  • Introduce dune configuration for cryptis and examples Rocq theories plus shared flag generation.
  • Add scripts/config to generate _RocqProject and update Makefile/ignore rules accordingly.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rocq-cryptis.opam Adds logpath tags and switches build/install to ./make-package.
rocq-cryptis-examples.opam Adds a new opam package for building/installing examples separately.
make-package New helper script to generate a per-package Rocq makefile and build/install it.
gen_RocqProject.sh New generator for _RocqProject based on config/* inputs.
dune-project Declares dune language version and enables rocq integration.
dune Generates flags.dune from config/flags and applies flags to rocq builds.
cryptis/dune Defines the main Rocq theory/package for dune builds.
examples/dune Defines an examples Rocq theory/package for dune builds.
config/paths Declares Rocq logical paths per package.
config/flags Declares shared Rocq compilation flags.
_CoqProject Removes flags/path directives, leaving a sources list layout.
Makefile Switches to _RocqProject + rocq makefile, adds dune target, updates clean/builddep behavior.
.gitignore Expands ignored build artifacts for Rocq/dune/opam workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread make-package Outdated
Comment thread gen_RocqProject.sh
Comment thread gen_RocqProject.sh Outdated
Comment thread gen_RocqProject.sh
Comment thread dune
@chandradeepdey
chandradeepdey force-pushed the dune branch 5 times, most recently from 9c6b414 to ed64f46 Compare June 12, 2026 06:18
Comment thread make-package

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a bit overkill? We don't have separate packages per se in this repository, unless we view the examples as a separate entity.

@chandradeepdey chandradeepdey Sep 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove the separate package for examples from this PR and rebase. But the plan is to eventually have separate packages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing separate packages is more work than I thought. Cryptis's directory structure is nice (cryptis and examples in separate directories). I don't think I want to change that, though I want to split out the Actris parts into a third directory (and the ReLoC parts into a fourth directory eventually). The way the scripts are designed to take one directory per line is also great, which I don't think I want to change.

Once the Actris dependency is added to opam, I will do the three directory split but with a single package. I will then rebase this on top of that, and we will have dune + three packages.

Comment thread gen_RocqProject.sh
- following std++/Iris dune scripts
@chandradeepdey

Copy link
Copy Markdown
Contributor Author

Rebased, but it is dependent on #23 for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants