You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+94-1Lines changed: 94 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,8 @@ cabal build kore
43
43
```
44
44
45
45
If using `cabal`, version 3.0 or later is recommended.
46
+
You may pass `--fast` to `stack build` or `-O0` to `cabal build` in order to
47
+
disable compiler optimizations and make build faster at the cost of slower runtime.
46
48
47
49
Using [make]:
48
50
@@ -132,19 +134,101 @@ cabal build --enable-tests --enable-benchmarks --only-dependencies kore
132
134
133
135
### Developing with Nix
134
136
137
+
To build and run nix based packages at RV, please follow these instructions to set up nix:
138
+
139
+
_We are switching to using [nix flakes](https://nixos.wiki/wiki/Flakes) in all our repos. What this means at a high level is that some of the commands for building packages look a bit different._
140
+
141
+
To set up nix flakes you will need to install `nix` 2.4 or higher.If you are on a standard Linux distribution, such as Ubuntu, first [install nix](https://nixos.org/download.html#download-nix)
142
+
and then enable flakes by editing either `~/.config/nix/nix.conf` or `/etc/nix/nix.conf` and adding:
143
+
144
+
```
145
+
experimental-features = nix-command flakes
146
+
```
147
+
148
+
This is needed to expose the Nix 2.0 CLI and flakes support that are hidden behind feature-flags. (If you are on a different system like nixOS, see instructions for enabling flakes here: https://nixos.wiki/wiki/Flakes)
149
+
150
+
By default, Nix will build any project and its transitive dependencies from source, which can take a very long time. We therefore need to set up some binary caches to speed up the build
Next, we need to set up the cache for our haskell infrastructure, by adding the following sections to `/etc/nix/nix.conf` or, if you are a trusted user, `~/.config/nix/nix.conf` (if you don't know what a "trusted user" is, you probably want to do the former):
We provide a `shell.nix` expression with a suitable development environment and
136
188
a binary cache at [runtimeverification.cachix.org]. The development environment is intended to
137
189
be used with `nix-shell` and `cabal`.
138
190
139
191
When the `.cabal` package description file changes, run:
140
192
141
-
```.sh
193
+
194
+
```
195
+
# Requires Nix with flakes enabled.
196
+
nix run .#update-cabal
197
+
```
198
+
199
+
or
200
+
201
+
```
142
202
# Requires Nix to be installed.
143
203
./nix/rematerialize.sh
144
204
```
145
205
146
206
This script is also run by an automatic workflow.
147
207
208
+
### New GHC 9.2.3 dev shell
209
+
210
+
In order to make use of the new profiling options in GHC 9.2, we've added a nix shell which builds kore with GHC 9.2.3, to open the shell, run
211
+
212
+
```
213
+
nix develop .#ghc9
214
+
```
215
+
216
+
Then, use stack to build against `stack-nix-ghc9.yaml`:
217
+
218
+
```
219
+
stack --stack-yaml stack-nix-ghc9.yaml build
220
+
```
221
+
222
+
If you modified the `kore.cabal` file and want to build with GHC 9, you will have to run
223
+
224
+
```
225
+
# Requires Nix with flakes enabled.
226
+
nix run .#update-cabal-ghc9
227
+
```
228
+
229
+
230
+
### Integration tests
231
+
148
232
We provide a `test.nix` for running integration tests:
149
233
150
234
```sh
@@ -153,6 +237,15 @@ nix-build test.nix --argstr test imp # run the integration tests in test/imp
153
237
nix-shell test.nix # enter a shell where we can run tests manually
154
238
```
155
239
240
+
You can also us a new nix flake shell feature to compile the K framework against your current version of haskell backend and bring K into scope of your current shell via
where `<commit>` can be empty or point to a specific version of the K framework github repository. Running this command will add all of the K binaries like `kompile` or `kast` into the `PATH` of your current shell (this is not permanent and will only persist in your current shell window until you close it).
0 commit comments