diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 54 |
1 files changed, 33 insertions, 21 deletions
| @@ -13,43 +13,55 @@ of pruning tables that were developed independently. | |||
| 13 | 13 | ||
| 14 | ## Building | 14 | ## Building |
| 15 | 15 | ||
| 16 | This project currently supports only POSIX systems (Linux, MacOS, BSD...). | 16 | This project is mainly developed on UNIX systems (Linux, MacOS, BSD...), |
| 17 | If you want to build on Windows you can do so via | 17 | but 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 | |
| 19 | the resulting executable will not be a native Windows executable. | 19 | ### UNIX (Linux, MaxOS, BSD...) |
| 20 | Windows as a build target will be available in the future. | ||
| 21 | 20 | ||
| 22 | To build nissy simply run | 21 | To build nissy simply run |
| 23 | 22 | ||
| 24 | ``` | 23 | ``` |
| 25 | $ ./build | 24 | $ ./build.sh |
| 26 | ``` | 25 | ``` |
| 27 | 26 | ||
| 28 | For a list of options and targets for the build system run `./build help`. | 27 | For a list of options and targets for the build system run `./build.sh help`. |
| 29 | Some compiler settings can be overridden using environment variables, | 28 | Some compiler settings can be overridden using environment variables, |
| 30 | as explained in the comments at the beginning of the build script. For | 29 | as explained in the comments at the beginning of the build script. For |
| 31 | example, the command: | 30 | example, 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 | ||
| 38 | is going to configure `nissy` to use at most 3 threads, and build it with | 37 | is 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 | |||
| 42 | It is possible to build this project on Windows using `build.bat`. This script | ||
| 43 | is going to build: | ||
| 44 | |||
| 45 | * The core nissy library | ||
| 46 | * The shell `run.exe` (see below) | ||
| 47 | * The Python module (see below) | ||
| 48 | |||
| 49 | All other options are unavailable. Moreover, Windows build will not | ||
| 50 | enable certain optimizations, such as multithreading and advanced CPU | ||
| 51 | instructions. Work is ongoing to improve Windows support. | ||
| 40 | 52 | ||
| 41 | ## Running tests | 53 | ## Running tests |
| 42 | 54 | ||
| 43 | This project includes a suite of "unit" test. You can run them with: | 55 | This 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 | ||
| 49 | For running the tests for the WebAssembly build with nodejs you can use: | 61 | For 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 | ||
| 55 | To run only a subset of the tests, you can pass as argument a regular | 67 | To 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. | |||
| 84 | To run a tool you can use: | 96 | To 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 | ||
| 90 | Where `TOOLNAME` is the name of one of the tools, or a regular expression | 102 | Where `TOOLNAME` is the name of one of the tools, or a regular expression |
| @@ -94,7 +106,7 @@ parameters. | |||
| 94 | For example: | 106 | For example: |
| 95 | 107 | ||
| 96 | ``` | 108 | ``` |
| 97 | $ :./build tool gendata h48h2k2 | 109 | $ :./build.sh tool gendata h48h2k2 |
| 98 | ``` | 110 | ``` |
| 99 | 111 | ||
| 100 | Will run a tool that generates the data table for the H48 solver with | 112 | Will 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 | |||
| 104 | benchmark. The output as well as the time of the run are saved to a | 116 | benchmark. The output as well as the time of the run are saved to a |
| 105 | file in the tools/results folder. | 117 | file in the tools/results folder. |
| 106 | 118 | ||
| 107 | To build and run a tool in debug mode, use `./build -d tool`. | 119 | To 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 | |||
| 113 | all other tools, or all together with | 125 | all 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 | ||
| 119 | If one of the solvetests fails, subsequent tests are going to be skipped. | 131 | If one of the solvetests fails, subsequent tests are going to be skipped. |
| @@ -127,7 +139,7 @@ as the commands require quite verbose options. | |||
| 127 | To build the shell run: | 139 | To build the shell run: |
| 128 | 140 | ||
| 129 | ``` | 141 | ``` |
| 130 | $ ./build shell | 142 | $ ./build.sh shell |
| 131 | ``` | 143 | ``` |
| 132 | 144 | ||
| 133 | This will create an executable called `run`. Then you can for example | 145 | This 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 | |||
| 192 | example: | 204 | example: |
| 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 | ||
| 198 | NOTE: If you prefer to use a C-style API, you'll have to write | 210 | NOTE: 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 | |||
| 207 | sometimes return strings instead of writing to `char *` buffers. | 219 | sometimes return strings instead of writing to `char *` buffers. |
| 208 | 220 | ||
| 209 | To build the Python module you need the Python development headers | 221 | To build the Python module you need the Python development headers |
| 210 | installed. You can check this from the output of `./build config`: | 222 | installed. You can check this from the output of `./build.sh config`: |
| 211 | 223 | ||
| 212 | ``` | 224 | ``` |
| 213 | $ ./build config | 225 | $ ./build.sh config |
| 214 | ... | 226 | ... |
| 215 | Python bindings: version 3.13 | 227 | Python bindings: version 3.13 |
| 216 | ``` | 228 | ``` |
| @@ -218,7 +230,7 @@ Python bindings: version 3.13 | |||
| 218 | Then to build the module: | 230 | Then to build the module: |
| 219 | 231 | ||
| 220 | ``` | 232 | ``` |
| 221 | $ ./build python | 233 | $ ./build.sh python |
| 222 | ``` | 234 | ``` |
| 223 | 235 | ||
| 224 | And to import it | 236 | And to import it |
| @@ -255,7 +267,7 @@ Bindings for JavaScript via a WebAssembly build (using | |||
| 255 | The JavaScript module can be built with | 267 | The JavaScript module can be built with |
| 256 | 268 | ||
| 257 | ``` | 269 | ``` |
| 258 | $ ./build web | 270 | $ ./build.sh web |
| 259 | ``` | 271 | ``` |
| 260 | 272 | ||
| 261 | An example web app running nissy can be found in the `web/http` folder. | 273 | An example web app running nissy can be found in the `web/http` folder. |
