aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md54
1 files changed, 33 insertions, 21 deletions
diff --git a/README.md b/README.md
index d025f89..a3c9347 100644
--- a/README.md
+++ b/README.md
@@ -13,43 +13,55 @@ of pruning tables that were developed independently.
13 13
14## Building 14## Building
15 15
16This project currently supports only POSIX systems (Linux, MacOS, BSD...). 16This project is mainly developed on UNIX systems (Linux, MacOS, BSD...),
17If you want to build on Windows you can do so via 17but it is also possible to build it on Windows, with some limitations.
18[WSL](https://learn.microsoft.com/en-us/windows/wsl/install). Note that 18
19the resulting executable will not be a native Windows executable. 19### UNIX (Linux, MaxOS, BSD...)
20Windows as a build target will be available in the future.
21 20
22To build nissy simply run 21To build nissy simply run
23 22
24``` 23```
25$ ./build 24$ ./build.sh
26``` 25```
27 26
28For a list of options and targets for the build system run `./build help`. 27For a list of options and targets for the build system run `./build.sh help`.
29Some compiler settings can be overridden using environment variables, 28Some compiler settings can be overridden using environment variables,
30as explained in the comments at the beginning of the build script. For 29as explained in the comments at the beginning of the build script. For
31example, the command: 30example, the command:
32 31
33``` 32```
34$ export NISSY_BUILD_THREADS=3 33$ export NISSY_BUILD_THREADS=3
35$ CC=gcc ./build 34$ CC=gcc ./build.sh
36``` 35```
37 36
38is going to configure `nissy` to use at most 3 threads, and build it with 37is going to configure `nissy` to use at most 3 threads, and build it with
39`gcc`. Se the comments in `./build` for more details. 38`gcc`. Se the comments in `./build.sh` for more details.
39
40### Windows
41
42It is possible to build this project on Windows using `build.bat`. This script
43is going to build:
44
45* The core nissy library
46* The shell `run.exe` (see below)
47* The Python module (see below)
48
49All other options are unavailable. Moreover, Windows build will not
50enable certain optimizations, such as multithreading and advanced CPU
51instructions. Work is ongoing to improve Windows support.
40 52
41## Running tests 53## Running tests
42 54
43This project includes a suite of "unit" test. You can run them with: 55This project includes a suite of "unit" test. You can run them with:
44 56
45``` 57```
46$ ./build test 58$ ./build.sh test
47``` 59```
48 60
49For running the tests for the WebAssembly build with nodejs you can use: 61For running the tests for the WebAssembly build with nodejs you can use:
50 62
51``` 63```
52$ ./build webtest 64$ ./build.sh webtest
53``` 65```
54 66
55To run only a subset of the tests, you can pass as argument a regular 67To run only a subset of the tests, you can pass as argument a regular
@@ -84,7 +96,7 @@ are not run in debug mode by default.
84To run a tool you can use: 96To run a tool you can use:
85 97
86``` 98```
87$ ./build tool TOOLNAME PARAMETERS... 99$ ./build.sh tool TOOLNAME PARAMETERS...
88``` 100```
89 101
90Where `TOOLNAME` is the name of one of the tools, or a regular expression 102Where `TOOLNAME` is the name of one of the tools, or a regular expression
@@ -94,7 +106,7 @@ parameters.
94For example: 106For example:
95 107
96``` 108```
97$ :./build tool gendata h48h2k2 109$ :./build.sh tool gendata h48h2k2
98``` 110```
99 111
100Will run a tool that generates the data table for the H48 solver with 112Will run a tool that generates the data table for the H48 solver with
@@ -104,7 +116,7 @@ Each tool run is automatically timed, so these tools can be used as
104benchmark. The output as well as the time of the run are saved to a 116benchmark. The output as well as the time of the run are saved to a
105file in the tools/results folder. 117file in the tools/results folder.
106 118
107To build and run a tool in debug mode, use `./build -d tool`. 119To build and run a tool in debug mode, use `./build.sh -d tool`.
108 120
109### The `solvetest` tools 121### The `solvetest` tools
110 122
@@ -113,7 +125,7 @@ solvers produce the correct solutions. They can be run individually as
113all other tools, or all together with 125all other tools, or all together with
114 126
115``` 127```
116$ ./build solvetest # Use -d for debug mode (very slow for some solvers) 128$ ./build.sh solvetest # Use -d for debug mode (very slow for some solvers)
117``` 129```
118 130
119If one of the solvetests fails, subsequent tests are going to be skipped. 131If one of the solvetests fails, subsequent tests are going to be skipped.
@@ -127,7 +139,7 @@ as the commands require quite verbose options.
127To build the shell run: 139To build the shell run:
128 140
129``` 141```
130$ ./build shell 142$ ./build.sh shell
131``` 143```
132 144
133This will create an executable called `run`. Then you can for example 145This will create an executable called `run`. Then you can for example
@@ -192,7 +204,7 @@ interface. You can build them and run them with the build tool, for
192example: 204example:
193 205
194``` 206```
195./build cpp cpp/examples/solve_h48h3k2.cpp 207./build.sh cpp cpp/examples/solve_h48h3k2.cpp
196``` 208```
197 209
198NOTE: If you prefer to use a C-style API, you'll have to write 210NOTE: If you prefer to use a C-style API, you'll have to write
@@ -207,10 +219,10 @@ this module follows the C API quite closely, except its functions
207sometimes return strings instead of writing to `char *` buffers. 219sometimes return strings instead of writing to `char *` buffers.
208 220
209To build the Python module you need the Python development headers 221To build the Python module you need the Python development headers
210installed. You can check this from the output of `./build config`: 222installed. You can check this from the output of `./build.sh config`:
211 223
212``` 224```
213$ ./build config 225$ ./build.sh config
214... 226...
215Python bindings: version 3.13 227Python bindings: version 3.13
216``` 228```
@@ -218,7 +230,7 @@ Python bindings: version 3.13
218Then to build the module: 230Then to build the module:
219 231
220``` 232```
221$ ./build python 233$ ./build.sh python
222``` 234```
223 235
224And to import it 236And to import it
@@ -255,7 +267,7 @@ Bindings for JavaScript via a WebAssembly build (using
255The JavaScript module can be built with 267The JavaScript module can be built with
256 268
257``` 269```
258$ ./build web 270$ ./build.sh web
259``` 271```
260 272
261An example web app running nissy can be found in the `web/http` folder. 273An example web app running nissy can be found in the `web/http` folder.

Generated with cgit - Back to sebastiano.tronto.net