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
***On Windows:**`scripts\mrbind\generate_win.bat -B --trace` from the VS developer command prompt (use the `x64 Native` one!).
217
235
@@ -225,22 +243,21 @@ Run the generator on different platforms:
225
243
226
244
***On MacOS:** Same as on Linux, but before running the command you must adjust the PATH. On Arm Macs: `export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"`, and on x86 Macs `/usr/local/...` instead of `/opt/homebrew/...`. This adds the version of Make installed in Homebrew to PATH, because the default one is outdated. Confirm the version with `make --version`, it must be 4.x or newer.
227
245
228
-
Create Wheel:
246
+
#### Some common flags:
229
247
230
-
```sh
231
-
# This will generate the `meshsdk` wheel to `./scripts/wheel/meshsdk`
***`-B` — force a full rebuild of the bindings.** Incremental builds are not very useful, because they're not perfect and can miss changes. Use incremental builds e.g. when you're fixing linker errors.
236
251
237
-
```sh
238
-
cd ./scripts/wheel/meshsdk
239
-
pip install .
252
+
The remaining flags are for Python bindings only:
240
253
241
-
# Check the installed `meshsdk`
242
-
pip list | grep meshsdk
243
-
```
254
+
***`MODE=none` — disable optimization** for faster build times. The default is `MODE=release`. To enable debug symbols, use `MODE=debug`. To set completely custom compiler flags, set `EXTRA_CFLAGS` and `EXTRA_LDFLAGS`.
255
+
256
+
***`NUM_FRAGMENTS=?? -j??` — adjust RAM usage vs build speed tradeoff.**`NUM_FRAGMENTS=??` is how many translation units the bindings are split into. `-j??` is the number of parallel build threads/processes. `NUM_FRAGMENTS=64 -j8` is the default, good for 16 GB of RAM.
257
+
258
+
Guessing the fastest combination isn't trivial. Usually less fragments and more threads lead to faster builds but more RAM usage, but not always; turns out `NUM_FRAGMENTS=1` isn't optimal even if you have enough RAM for it.
259
+
260
+
***`PYTHON_PKGCONF_NAME=python-3.??-embed` — select Python version.** We try to guess this one. You can set this to `python3-embed` to use whatever the OS considers to be the default version.
0 commit comments