1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# https://just.systems/man/en/
#
# Take a look at ./doc/manual/src/contributing/hacking.md for a detailed
# explanation on how to use this file!
outdir := x"${out:-$PWD/outputs/out}"
builddir := "build"
# List all available targets
list:
just --list
# Build the WASM evaluator module (libnixexpr.wasm) for the gonix Go host.
# Output: build-wasm/lix/libnixexpr.wasm
# After building, wasm-opt applies --spill-pointers for BoehmGC stack scanning safety.
build-wasm *OPTIONS:
meson setup build-wasm \
--cross-file wasm-cross.ini \
-Dwasm-eval-only=true \
-Denable-tests=false \
-Denable-docs=false \
-Dgc=disabled \
--reconfigure \
{{ OPTIONS }} || true
meson compile -C build-wasm libnixexpr.wasm
# Clean build artifacts
clean:
rm -rf {{ builddir }}
# Prepare meson for building.
setup *OPTIONS:
meson setup {{ builddir }} --reconfigure --prefix="{{outdir}}" $mesonFlags {{ OPTIONS }}
# Build lix with extra options
build *OPTIONS:
meson compile -C {{ builddir }} {{ OPTIONS }}
alias compile := build
# `meson install` will automatically build anything that needs to be built to install it.
[doc("Install Lix for local development")]
install *OPTIONS:
meson install --quiet -C {{ builddir }} {{ OPTIONS }}
# Run all tests tests (installs first).
test *OPTIONS: (install)
meson test -C {{ builddir }} --print-errorlogs --max-lines 10000 {{ OPTIONS }}
# Run unit tests only
test-unit *OPTIONS: (test "--suite" "check")
# Run integration tests only
test-integration *OPTIONS: (test "--suite" "installcheck" OPTIONS)
# Run functional2 tests using pytest directly, allowing for additional arguments to be passed to pytest e.g. for more granular test selection
test-functional2 *OPTIONS:
cd tests/functional2 && python -m pytest -v {{ OPTIONS }}
alias clang-tidy := lint
# Lint with `clang-tidy`
lint:
ninja -C build clang-tidy
alias clang-tidy-fix := lint-fix
# Fix lints with `clang-tidy-fix`
lint-fix:
ninja -C build clang-tidy-fix
|