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: BUILDING.md
+29-13Lines changed: 29 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -11,38 +11,50 @@ To build **mlkem-native**, you need `make` and a C90 compiler. To use the test s
11
11
You can build and test **mlkem-native** as follows:
12
12
13
13
```bash
14
-
make quickcheck# With native code backend (if available)
15
-
make OPT=0 quickcheck# With C backend
14
+
make test# With native code backend (if available)
15
+
make OPT=0 test# With C backend
16
16
```
17
17
18
-
To merely build test and benchmarking components, use the following `make` targets:
18
+
To merely build test components, use the following `make` targets:
19
19
20
20
```bash
21
-
make mlkem
21
+
make func
22
22
make nistkat
23
23
make kat
24
+
make acvp
24
25
```
25
26
26
-
For benchmarking, specify the cycle counting method. Currently, **mlkem-native** is supporting PERF, PMU (AArch64 and x86 only), M1 (Apple Silicon only):
27
+
To run them, add `run_`:
28
+
29
+
```bash
30
+
make run_func
31
+
make run_nistkat
32
+
make run_kat
33
+
make run_acvp
34
+
```
35
+
36
+
The resulting binaries can be found in `test/build` (their full path is printed by `make`).
37
+
38
+
For benchmarking, specify the cycle counting method. Currently, **mlkem-native** is supporting PERF, PMU (AArch64 and
39
+
x86 only), M1 (Apple Silicon only):
40
+
27
41
```
28
42
# CYCLES has to be on of PERF, PMU, M1, NO
29
-
make bench CYCLES=PERF
30
-
make bench_components CYCLES=PERF
43
+
make run_bench CYCLES=PERF
44
+
make run_bench_components CYCLES=PERF
31
45
```
32
46
33
-
The resulting binaries can then be found in `test/build`.
34
-
35
47
### Using `tests` script
36
48
37
-
We recommend compiling and running tests and benchmarks using the [`./scripts/tests`](scripts/tests) script. For
49
+
For convenience, you can also use the [`./scripts/tests`](scripts/tests) script as a wrapper around `make`. For
38
50
example,
39
51
40
52
```bash
41
53
./scripts/tests func
42
54
```
43
55
44
-
will compile and run functionality tests. For detailed information on how to use the script, please refer to the
45
-
`--help` option.
56
+
will compile and run functionality tests. For detailed information on how to use the script, please refer to
57
+
`./scripts/tests --help`.
46
58
47
59
### Windows
48
60
@@ -59,11 +71,15 @@ There are further scripts used for development of mlkem-native, such as `format`
59
71
60
72
### nix setup
61
73
62
-
We specify the development environment for mlkem-native using nix. If you want to help develop mlkem-native, please setup nix using the [nix installer script](https://nixos.org/download/), not your package manager.
74
+
We specify the development environment for mlkem-native using nix. If you want to help develop mlkem-native, please setup nix using the [nix installer script](https://nixos.org/download/), not your package manager.
63
75
64
76
All the development and build dependencies are specified in [flake.nix](flake.nix). To execute a bash shell, run
0 commit comments