|
| 1 | +# Installation |
| 2 | + |
| 3 | +You can choose to install crs from either: |
| 4 | + |
| 5 | +- The public opam-repository (most stable releases) |
| 6 | +- A custom opam-repository (more frequent releases) |
| 7 | +- From source (most recent version, PRs, etc.) |
| 8 | + |
| 9 | +Releases are currently versioned using the scheme `0.0.YYYMMDD` while we are in the early stages of development. |
| 10 | + |
| 11 | +## Release Process |
| 12 | + |
| 13 | +The exact rate at which we publish new versions during the early stages of the project is not really established yet. We'd like to find a balance that feels right between making sure new features and bug fixes are continuously delivered to people experimenting with the project on one hand, but not publishing too many intermediate versions to the public opam repository on the other hand. |
| 14 | + |
| 15 | +The way in which we propose to do this with this project is that we publish somewhat frequent releases of the project to a custom opam-repository. In particular note that not every release that is published that way will make it into a public release - we will skip some, and only publish a public release every so often. |
| 16 | + |
| 17 | +Finally, if you'd like to try or test the latest current version, or the tip of an ongoing PR, you may build from source. |
| 18 | + |
| 19 | +## From the Public Opam Repository |
| 20 | + |
| 21 | +Public releases of crs are published to the main [opam-repository](https://github.com/ocaml/opam-repository). Install it with the [opam](https://opam.ocaml.org) package manager by running: |
| 22 | + |
| 23 | +<!-- $MDX skip --> |
| 24 | +```sh |
| 25 | +opam install crs |
| 26 | +``` |
| 27 | + |
| 28 | +Note that crs needs to be installed in a switch with `ocaml >= 5.2`. |
| 29 | + |
| 30 | +## From the Custom Opam Repository |
| 31 | + |
| 32 | +Intermediate releases for this project are published to a [custom opam-repo](https://github.com/mbarbin/opam-repository.git). To add it to your current opam switch, run: |
| 33 | + |
| 34 | +<!-- $MDX skip --> |
| 35 | +```sh |
| 36 | +opam repo add mbarbin https://github.com/mbarbin/opam-repository.git |
| 37 | +``` |
| 38 | + |
| 39 | +Then you can install crs using a normal opam workflow: |
| 40 | + |
| 41 | +<!-- $MDX skip --> |
| 42 | +```sh |
| 43 | +opam install crs |
| 44 | +``` |
| 45 | + |
| 46 | +## Build from Sources |
| 47 | + |
| 48 | +Assuming you have a working environment with `OCaml >= 5.2`, `opam` and `dune` you should be able to install the project's dependencies in your current opam switch by running: |
| 49 | + |
| 50 | +<!-- $MDX skip --> |
| 51 | +```sh |
| 52 | +opam install . --deps-only |
| 53 | +``` |
| 54 | + |
| 55 | +And then build with: |
| 56 | + |
| 57 | +<!-- $MDX skip --> |
| 58 | +```sh |
| 59 | +dune build |
| 60 | +``` |
| 61 | + |
| 62 | +### Unreleased Packages |
| 63 | + |
| 64 | +From time to time, the project may have temporary dependencies on packages that are being worked on and perhaps not yet published to the main opam repository. When this is the case, these packages are released to the custom opam repository mentioned earlier, and you'll need to add it to the opam switch that you use to build the project. |
| 65 | + |
| 66 | +For example, if you use a local opam switch, this would look like this: |
| 67 | + |
| 68 | +<!-- $MDX skip --> |
| 69 | +```sh |
| 70 | +git clone https://github.com/mbarbin/crs.git |
| 71 | +cd crs |
| 72 | +opam switch create . 5.3.0 --no-install |
| 73 | +eval $(opam env) |
| 74 | +opam repo add mbarbin https://github.com/mbarbin/opam-repository.git |
| 75 | +opam install . --deps-only |
| 76 | +``` |
| 77 | + |
| 78 | +Once this is setup, you can build with dune: |
| 79 | + |
| 80 | +<!-- $MDX skip --> |
| 81 | +```sh |
| 82 | +dune build |
| 83 | +``` |
0 commit comments