-
Notifications
You must be signed in to change notification settings - Fork 717
Expand file tree
/
Copy pathpixi.toml
More file actions
649 lines (538 loc) · 32.6 KB
/
pixi.toml
File metadata and controls
649 lines (538 loc) · 32.6 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# Pixi is a package management tool for developers.
# Before running a task, pixi ensures that all listed dependencies are installed first.
#
# Run tasks with `pixi run TASK`, e.g. `pixi run codegen`.
# Extra CLI arguments after `pixi run TASK` are passed to the task cmd.
# List tasks with `pixi task list`
#
# https://pixi.sh/latest/
#
# Python Development Workflow:
# ----------------------------
# Pixi manages build tools (Rust, C++, maturin, etc.) while uv manages Python runtime
# dependencies in a separate .venv directory. To work with Python:
#
# pixi run py-build # Build the rerun-sdk
# pixi run uv run examples/python/minimal/… # Run Python scripts via uv
# pixi run uvpy script.py # Shorthand for running Python scripts
#
# See the [environments] section below for more details.
#
# Check your environment is correct by running: pixi run check-env
[workspace]
name = "rerun"
authors = ["rerun.io <opensource@rerun.io>"]
channels = ["conda-forge"]
description = "Log images, point clouds, etc, and visualize them effortlessly"
homepage = "https://rerun.io"
license = "MIT OR Apache-2.0"
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
readme = "README.md"
repository = "https://github.com/rerun-io/rerun"
version = "0.1.0" # TODO(emilk): sync version with `Cargo.toml` with help from `crates.py`
requires-pixi = ">=0.55.0" # Make sure to keep this in sync with the version on our CI jobs!
[system-requirements]
macos = "11.0" # needed for some reason otherwise fails to resolve mediapipe package
libc = "2.28"
# These should be kept empty as their content is pulled in every single environment. For the "standard" stuff,
# dependencies are listed in the `base` feature instead.
[dependencies]
[pypi-dependencies]
################################################################################
# ACTIVATION
################################################################################
# Global
[activation]
# Run ensure-rerun-env to set up pyo3-build.cfg and uv shim.
scripts = ["scripts/pixi/activate.sh"]
[activation.env]
RERUN_DEV_ENVIRONMENT = "true"
# The executable extension for binaries on the current platform.
EXECUTABLE_EXTENSION = ""
# Prepend scripts/pixi to PATH so our uv wrapper shadows the conda uv.
# This ensures uv targets .venv instead of the pixi environment.
PATH = "${PIXI_PROJECT_ROOT}/scripts/pixi:${PATH}"
[target.win-64.activation]
# Run ensure-rerun-env to set up pyo3-build.cfg and uv shim.
# This is a polyglot .bat that works in both cmd.exe and bash (Git Bash).
scripts = ["scripts/pixi/activate.bat"]
[target.win-64.activation.env]
# The executable extension for binaries on the current platform.
EXECUTABLE_EXTENSION = ".exe"
# Prepend scripts/pixi to PATH so our uv wrapper shadows the conda uv.
# This ensures uv targets .venv instead of the pixi environment.
PATH = "%PIXI_PROJECT_ROOT%\\scripts\\pixi;%PATH%"
################################################################################
# ENVIRONMENTS
################################################################################
[environments]
# The default environment is meant to serve as the basis for common development and
# CI tasks. If you are only working in rust, this is the only environment you need.
#
# Python run-time dependencies are installed and managed in a parallel uv environment.
# `pixi run py-build` will install the rerun-sdk package into that uv environment.
#
# NOTE: when you run `pixi run uv`, it will find a `uv` helper script, which unsets
# CONDA_PREFIX before invoking uv, ensuring that the uv environment is used rather
# than leaking the pixi conda environment.
#
# To run code that uses cpp bindings, you will generally need to use the `cpp` env.
# - The cpp feature cannot be included in the default environment because
# it breaks compilation of the rerun client on linux. See: https://github.com/rerun-io/rerun/issues/6852
default = ["base"]
# The cpp environment is for building any code that depends on the C++ `rerun-sdk`.
#
# ⚠️ This environment sets the C/C++ compiler to the system compiler (see c-compiler/cxx-compiler dependencies).
# As of writing this breaks building the web viewer on MacOS, so do not enable it in any environment
# in which you want to do viewer builds.
cpp = ["base", "cpp"]
################################################################################
# TASKS
################################################################################
[tasks]
# Note: extra CLI argument after `pixi run TASK` are passed to the task cmd.
# Check that your environment is set up correctly
check-env = "python scripts/check_env.py"
# Run the codegen. Optionally pass `--profile` argument if you want.
codegen = "cargo run --package re_types_builder -- "
# Run the codegen for protobuf types.
codegen-protos = { cmd = "cargo run --package re_protos_builder && cargo fmt -p re_protos", depends-on = [
# "pb-snapshot", # TODO(cmc): reenable if we ever go back to snapshot-based BW compat for protobuf
] }
codegen-protos-check = "before=$(./scripts/ci/compare_path_digest.py crates/store/re_protos) ; pixi run codegen-protos && ./scripts/ci/compare_path_digest.py crates/store/re_protos $before"
# Generate the Rerun CLI manual.
# NOTE: must be --all-features, otherwise we might miss some optional commands.
man = "RERUN_DISABLE_WEB_VIEWER_SERVER=1 cargo run --package rerun-cli --all-features -- man > docs/content/reference/cli.md"
# Compile and run the rerun viewer.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun = "cargo run --package rerun-cli --no-default-features --features release_no_web_viewer --"
# Compile and run the rerun viewer, with performance telemetry including Tracy profiler.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-perf-debug = "cargo run --package rerun-cli --no-default-features --features release_no_web_viewer,rerun/perf_telemetry_tracy --"
# Compile `rerun-cli` without the web-viewer.
rerun-build = "cargo build --package rerun-cli --no-default-features --features release_no_web_viewer"
# Compile `rerun-cli` without the web-viewer.
rerun-build-release = "cargo build --package rerun-cli --release --no-default-features --features release_no_web_viewer"
# Compile and run the rerun viewer with --release.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-release = "cargo run --package rerun-cli --no-default-features --features release_no_web_viewer --release --"
# Compile and run the rerun viewer in release mode, with performance telemetry including Tracy profiler.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-perf = "cargo run --package rerun-cli --no-default-features --features release_no_web_viewer,rerun/perf_telemetry_tracy --release --"
# Compile `rerun-cli` with the same feature set as we build for releases.
rerun-build-native-and-web = { cmd = "cargo build --package rerun-cli --no-default-features --features release_full --", depends-on = [
"rerun-build-web",
] }
# Compile `rerun-cli` with the same feature set as we build for releases.
rerun-build-native-and-web-release = { cmd = "cargo build --package rerun-cli --no-default-features --features release_full --release --", depends-on = [
"rerun-build-web-release",
] }
rerun-build-native-and-pending-web-release = { cmd = "cargo build --package rerun-cli --no-default-features --features release_full --release --", env = { RERUN_TRAILING_WEB_VIEWER = "1" } }
# Compile and run the web-viewer via rerun-cli.
#
# You can also give an argument for what to view (e.g. an .rrd file).
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-web = { cmd = "cargo run --package rerun-cli --no-default-features --features web_viewer -- --web-viewer", depends-on = [
"rerun-build-web",
] }
# Compile the web-viewer wasm, does not include the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --debug"
# Compile the web-viewer wasm and the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-cli = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --debug && cargo build --package rerun-cli --no-default-features --features web_viewer"
# Compile and run the web-viewer in release mode via rerun-cli.
#
# You can also give an argument for what to view (e.g. an .rrd file).
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-web-release = { cmd = "cargo run --package rerun-cli --no-default-features --features map_view,web_viewer --release -- --web-viewer", depends-on = [
"rerun-build-web-release",
] }
# Compile the web-viewer wasm in release mode.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --release"
rs-check = "python scripts/ci/rust_checks.py"
# Check that old .rrd files can still be read and understood.
# See tests/assets/rrd/README.md for more.
# Note that we run with `--check-footers=false`: it is expected that these RRDs do not have proper footers (they predate them).
check-backwards-compatibility = { cmd = "find tests/assets/rrd -name '*.rrd' -type f -print0 | xargs -0 cargo run --package rerun-cli --no-default-features rrd verify --check-footers=false" }
rs-fmt = "cargo fmt --all"
# Code formatting for all languages.
format = { depends-on = ["cpp-fmt", "misc-fmt", "pb-fmt", "py-fmt", "rs-fmt", "toml-fmt"] }
fmt = { depends-on = ["format"] }
# Check links
link-check-pr = { cmd = "python scripts/ci/pr_link_checker.py --base-ref {{ ref }}", args = [
{ arg = "ref" },
] }
link-check = 'lychee --cache --max-cache-age 1d . --root-dir "$PIXI_PROJECT_ROOT" "**/*.md" "**/*.rs" "**/*.toml" "**/*.hpp" "**/*.cpp" "**/CMakeLists.txt" "**/*.py" "**/*.yml"'
# Assorted linting tasks
fast-lint = "python scripts/fast_lint.py"
lint-codegen = "cargo run --package re_types_builder -- --check"
# TODO(jleibs): implement lint-cpp-files
lint-rerun = "python scripts/lint.py"
lint-rs-files = "rustfmt --edition 2024 --check"
lint-rs-all = "cargo fmt --check"
lint-typos = "typos"
# Toml tasks
toml-fmt-check = "taplo fmt --check --diff"
toml-fmt = "taplo fmt"
# uv lockfile check
# We unset RUSTC_WRAPPER because it can interfere with uv+maturin in minimal
# environments where we might want to run this check. The rust being used
# internally for this check is being set up by the pep517 environment and so
# we might run it in an environment that doesn't otherwise have or expect
# rust to be setup.
uv-lock-check-workspace = "env -u RUSTC_WRAPPER uv lock --dry-run && uv lock --check"
# Same check for every isolated example project (discovered via `[tool.rerun-example] isolated = true`).
uv-lock-check-isolated-examples = "python scripts/ci/isolated_examples.py check-lock"
uv-lock-check = { depends-on = ["uv-lock-check-workspace", "uv-lock-check-isolated-examples"] }
# ------------------------------------------------------------------------------------------
# Protobuf stuff:
#
# NOTE: `--error-format=json` because it's the only output format that contains the actual error code (so
# you can decide whether to ignore that specific code or not).
# See:
# * <https://buf.build/docs/breaking/rules/>
# * <https://buf.build/docs/lint/rules/>
pb-fmt-check = "buf format --exit-code --diff"
pb-fmt = "buf format --exit-code --write"
pb-lint = "buf lint --error-format=json"
# NOTE(cmc): I'm keeping all the snapshot machinery around if it turns out we need something more robust
# than a pure git solution in the future. For now, convenience wins.
#
# pb-snapshot-check = "before=$(./scripts/ci/compare_path_digest.py crates/store/re_protos/proto/schema_snapshot.yaml) ; pixi run pb-snapshot && ./scripts/ci/compare_path_digest.py crates/store/re_protos/proto/schema_snapshot.yaml $before"
# # TODO(cmc): I'd like to avoid the extra noise from source info and imports, but they are required for
# # `buf breaking` to not crash.
# # pb-snapshot = "buf build --output crates/store/re_protos/proto/schema_snapshot.yaml --exclude-source-info --exclude-imports"
# pb-snapshot = "buf build --error-format=json --output crates/store/re_protos/proto/schema_snapshot.yaml"
# pb-snapshot-main = "git show origin/main:crates/store/re_protos/proto/schema_snapshot.yaml > crates/store/re_protos/proto/schema_snapshot.main.yaml"
#
# pb-breaking = { cmd = "buf breaking --error-format=json --against crates/store/re_protos/proto/schema_snapshot.main.yaml", depends-on = [
# "pb-snapshot",
# "pb-snapshot-main",
# ]}
pb-breaking = "echo 'ℹ️ If this CI step is failing even though you did not modify any Protobuf files, that means that somebody purposefully published breaking Protobuf changes onto the main branch in the meantime.\nℹ️ For that reason, the Protobuf definitions on your local branch are now incompatible with those on main.\nℹ️ When that happens, simply rebase your branch on latest main, and the errors will go away.' ; buf breaking --error-format=json --against '.git#branch=origin/main'"
pb-check = { depends-on = ["pb-fmt-check", "pb-lint", "pb-breaking"] }
# ------------------------------------------------------------------------------------------
# Misc formatting tasks.
misc-fmt = "prettier --write '**/*.{yml,yaml,js,css,html}'"
misc-fmt-check = "prettier --check '**/*.{yml,yaml,js,css,html}'"
# Until we resolve nbqa config issue keep aligned with nbqa dirs above
nb-strip = "python scripts/nbstripout.py --directories mypy examples/ scripts/ tests/python/ docs/snippets/ -- --extra-keys='metadata.language_info metadata.vscode metadata.kernelspec cell.metadata.vscode' --drop-empty-cells"
nb-strip-check = "python scripts/nbstripout.py --directories mypy examples/ scripts/ tests/python/ docs/snippets/ -- --verify --extra-keys='metadata.language_info metadata.vscode metadata.kernelspec cell.metadata.vscode' --drop-empty-cells"
# Run first ruff fix, then ruff format, order is important see also https://twitter.com/charliermarsh/status/1717229721954799727
py-fmt = { cmd = "uv run ruff check --fix {{ files }} && uv run ruff format {{ files }}", args = [
{ arg = "files", default = "." },
] }
py-fmt-check = "uv run ruff check . && uv run ruff format --check ."
# Get non-internal things that are ok to not check rerun on
py-lint-non-sdk = { depends-on = [
"py-sync-examples", # these ensure that the .venv is in the right state for type checking examples and snippets
"py-sync-snippets",
], cmd = "uv run mypy --config-file rerun_py/.non_sdk_mypy.ini --no-warn-unused-ignore --cache-dir .mypy_cache_rerun_other" }
# I couldn't get the config to work correctly, so placing relevant directories in command line
# Until we resolve nbqa config issue keep aligned with nb-strip dirs below
# MYPYPATH is set to allow mypy to find rerun and rerun_bindings without needing maturin develop.
py-lint-nb-rerun = { cmd = "uv run nbqa mypy --no-warn-unused-ignore examples/notebook --cache-dir .mypy_cache_rerun_nb ", env = { MYPYPATH = "rerun_py:rerun_py/rerun_sdk:rerun_notebook/src" } }
# Need to run this in env with rerun installed
py-lint-rerun = "uv run mypy --no-warn-unused-ignore --cache-dir .mypy_cache_rerun_sdk"
py-lint-rerun-ty = "uv run ty check --error deprecated"
# Isolated examples (their own uv project + .venv, excluded from the shared mypy run above).
# The script auto-discovers any example whose pyproject.toml sets
# `[tool.rerun-example] isolated = true` and lints it with the shared mypy config.
# RERUN_ALLOW_MISSING_BIN matches `py-build` — lets maturin build the rerun-sdk extension
# into each example's .venv without needing the `rerun` CLI binary on disk first.
py-lint-isolated-examples = { cmd = "python scripts/ci/isolated_examples.py lint", env = { RERUN_ALLOW_MISSING_BIN = "1" } }
py-lint = { depends-on = [
"py-lint-rerun-ty", # Fast first
"py-lint-non-sdk",
"py-lint-rerun",
"py-lint-nb-rerun",
"py-lint-isolated-examples",
] }
rs-plot-dashboard = { cmd = "cargo r -p plot_dashboard_stress --release --" }
dev-tools = "cargo run --locked -p re_dev_tools --"
build-examples = "uv run cargo run --locked -p re_dev_tools -- build-examples"
# Start a local meilisearch instance at `localhost:7700` with master key `test`.
# This should only be used for testing the search index locally.
# Files are stored in the `meilisearch` directory, so you can fully wipe it via `rm -rf meilisearch`.
meilisearch = "meilisearch --db-path=./meilisearch/data.ms --dump-dir=./meilisearch/dumps/ --snapshot-dir=./meilisearch/snapshots/ --env=development --no-analytics --experimental-reduce-indexing-memory-usage --master-key=test"
# Update the results of `insta` and `kittest` snapshot regression tests
rs-update-snapshot-tests = "INSTA_UPDATE=always UPDATE_SNAPSHOTS=1 cargo nextest run --all-targets --all-features --cargo-quiet --no-fail-fast"
# Update the Python-based snapshot tests (inline-snapshot for inline snapshots, --snapshot-update for syrupy .ambr files)
py-update-snapshot-tests = { cmd = "uv run pytest -vv rerun_py/tests --inline-snapshot=fix --snapshot-update", depends-on = [
"py-build",
] }
# Update all snapshot tests
update-snapshot-tests = { depends-on = ["rs-update-snapshot-tests", "py-update-snapshot-tests"] }
# Upload image to gcloud storage.
upload-image = "python scripts/upload_image.py"
# Upload .rrd to gcloud storage.
upload-rrd = "python scripts/upload_rrd.py"
# Check whether there's too large files in the repository.
check-large-files = "python scripts/ci/check_large_files.py"
# Check whether there are `publish=true` crates which depend on `publish=false` crates in the repository.
check-publish-flags = "python scripts/ci/crates.py check-publish-flags"
# Download a specific artifact from gcloud.
#
# Requires that gcloud authentication has already been set up in your shell.
fetch-artifact = "python scripts/ci/fetch_artifact.py"
# Lint markdown
mdlint = "python scripts/ci/mdlint.py"
# Setup JS tools
js-setup = "npm i -g yarn"
# Install JS package dependencies
js-install = { cmd = "yarn install --cwd rerun_js", depends-on = ["js-setup"] }
# Build JS packages
js-build-base = { cmd = "yarn --cwd rerun_js/web-viewer run build", depends-on = ["js-install"] }
js-build-all = { cmd = "yarn --cwd rerun_js workspaces run build", depends-on = ["js-install"] }
# Build web-viewer and web-viewer-react without rebuilding re_viewer Wasm
js-build-no-wasm = { cmd = "yarn --cwd rerun_js workspaces run build:js", depends-on = [
"js-install",
] }
# Build individual package JS docs in their own directories
js-build-package-docs = { cmd = "yarn --cwd rerun_js workspaces run docs", depends-on = [
"js-install",
] }
# Combine the output of individual package docs into a single directory
js-docs = { cmd = "yarn --cwd rerun_js run docs", depends-on = ["js-build-package-docs"] }
js-docs-serve = { cmd = "yarn --cwd rerun_js run docs:serve", depends-on = ["js-docs"] }
# Build and install a development version of the rerun-sdk Python package.
#
# These packages are installed into the parallel uv environment.
#
# This only needs to be called when you have made changes that would impact the rust bindings of
# the python package. The python code will be imported directly from the source folder and will
# reflect changes immediately upon re-import.
# -
# - RERUN_ALLOW_MISSING_BIN is needed to allow maturin to run without the `rerun` binary being part of the rerun-sdk
# package.
py-build = { cmd = "uv run maturin develop --uv --manifest-path rerun_py/Cargo.toml --extras=tests,datafusion,dataloader,tracing", env = { RERUN_ALLOW_MISSING_BIN = "1" } }
# Build the `rerun-notebook` package.
py-build-notebook = { cmd = "uv sync --package rerun-notebook --inexact --no-install-package rerun-sdk", depends-on = [
"js-build-base",
] }
py-build-notebook-fast = { cmd = "uv sync --package rerun-notebook --inexact --no-install-package rerun-sdk" }
# Create a wheel for the `rerun-sdk` package.
py-build-wheel = { cmd = "cp target/release/rerun$EXECUTABLE_EXTENSION rerun_py/rerun_sdk/rerun_cli/ && uv run maturin build --release --manifest-path rerun_py/Cargo.toml", depends-on = [
"rerun-build-native-and-web-release",
] }
# Install example dependencies without rebuilding rerun-sdk.
# Use this after `py-build` to add example-specific packages like opencv, torch, etc.
py-sync-examples = { cmd = "pixi run uv sync --group examples --inexact --no-install-package rerun-sdk" }
# Install example snippet dependencies without rebuilding rerun-sdk.
# Use this after `py-build` to add snippet-specific dependencies.
py-sync-snippets = { cmd = "pixi run uv sync --group snippets --inexact --no-install-package rerun-sdk" }
# Build the `rerun-sdk` package in release mode.
py-build-release = { cmd = "uv run maturin develop --uv --release --manifest-path rerun_py/Cargo.toml --extras=tests,datafusion,dataloader", env = { RERUN_ALLOW_MISSING_BIN = "1" } }
# Build and install the `rerun-sdk` package with the `web_viewer` & `server` feature.
py-build-web-viewer = { cmd = "uv run maturin develop --uv --manifest-path rerun_py/Cargo.toml --features web_viewer --extras=tests,datafusion,dataloader", depends-on = [
"rerun-build-native-and-web",
], env = { RERUN_ALLOW_MISSING_BIN = "1" } }
# Build and install the `rerun-sdk` package with the `web_viewer` & `server` feature in release mode.
py-build-web-viewer-release = { cmd = "uv run maturin develop --uv --release --manifest-path rerun_py/Cargo.toml --features web_viewer --extras=tests,datafusion,dataloader", depends-on = [
"rerun-build-native-and-web-release",
], env = { RERUN_ALLOW_MISSING_BIN = "1" } }
# Dedicated alias for building the python bindings for the `py` environment with performance telemetry including Tracy profiler.
py-build-perf-debug = { cmd = "uv run maturin develop --uv --manifest-path rerun_py/Cargo.toml --features re_perf_telemetry/tracy --extras=tests,datafusion,dataloader,tracing", env = { RERUN_ALLOW_MISSING_BIN = "1" } }
# Dedicated alias for building the python bindings in release mode for the `py` environment with performance telemetry including Tracy profiler.
py-build-perf-release = { cmd = "uv run maturin develop --uv --release --manifest-path rerun_py/Cargo.toml --features re_perf_telemetry/tracy --extras=tests,datafusion,dataloader,tracing", env = { RERUN_ALLOW_MISSING_BIN = "1" } }
py-test = { cmd = "uvpy -m pytest -vv rerun_py/tests", depends-on = ["py-build"] }
py-test-no-build = { cmd = "uvpy -m pytest -vv rerun_py/tests" }
py-test-notebook = { cmd = "uvpy -m pytest -vv rerun_notebook/tests", depends-on = [
"py-build-notebook-fast",
] }
py-bench = { cmd = "uvpy -m pytest --benchmark-only --benchmark-group-by=func --benchmark-sort=fullname", depends-on = [
"py-build-release",
] }
snapshots = "uvpy scripts/snapshots.py"
py-check-signatures = { cmd = "uvpy scripts/ci/python_check_signatures.py", depends-on = [
"py-build",
] }
# Build the JS parts of `rerun-notebook` without rebuilding re_viewer Wasm in the process
py-build-notebook-js = { cmd = "npm --prefix rerun_notebook run build", depends-on = [
"js-build-no-wasm",
] }
# Build an installable SDK-only wheel. IMPORTANT: unlike the officially published wheels, the wheel produced by this command does NOT include the viewer.
py-build-wheels-sdk-only = { cmd = "RERUN_ALLOW_MISSING_BIN=1 python scripts/ci/build_and_upload_wheels.py --mode pr --dir ''" }
# Helper alias to run the python interpreter in the context of the python environment
rrpy = "uvpy"
py-plot-dashboard = { cmd = "uvpy tests/python/plot_dashboard_stress/main.py", depends-on = [
"py-build",
] }
# Build the documentation search index.
# See `pixi run search-index --help` for more information.
search-index = "uv run --group docs cargo run --locked -p re_dev_tools -- search-index"
# Serve python docs locally (uses mkdocs from uv docs dependency group)
py-docs-serve = "uv run --group docs mkdocs serve -f rerun_py/mkdocs.yml -w rerun_py"
# Build python docs locally (uses mkdocs from uv docs dependency group)
py-docs-build = "uv run --group docs mkdocs build -f rerun_py/mkdocs.yml"
# Compile the rerun viewer using the Cranelift backend for fast compilation.
# Codegen backend config is in .cargo/cranelift.toml (loaded via config-include on nightly).
# Requires: rustup component add rustc-codegen-cranelift-preview --toolchain nightly
[tasks.rerun-build-fast]
cmd = """cargo +nightly build --package re_viewer --bin viewer --profile dev-fast \
--config 'include=[".cargo/cranelift.toml"]'"""
[tasks.rerun-build-fast.env]
RUSTFLAGS = "-Z threads=0"
# Compile and run the rerun viewer using the Cranelift backend for fast compilation.
[tasks.rerun-fast]
cmd = "target/dev-fast/viewer"
depends-on = ["rerun-build-fast"]
[feature.cpp.tasks]
# All the cpp-* tasks can be configured with environment variables, e.g.: RERUN_WERROR=ON CXX=clang++
# We export a compilation database (compile_commands.json) in the CMake configure step (-DCMAKE_EXPORT_COMPILE_COMMANDS=ON),
# which is handy for various dev tools like clang-tidy, clangd, vscode etc (https://clang.llvm.org/docs/JSONCompilationDatabase.html).
cpp-prepare-release = "cmake -G 'Ninja' -B build/release -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release"
cpp-prepare = "cmake -G 'Ninja' -B build/debug -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug"
cpp-build-all = { cmd = "cmake --build build/debug --config Debug --target ALL", depends-on = [
"cpp-prepare",
] }
cpp-prepare-shared-libs = "cmake -G 'Ninja' -B build/debug -S . -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON"
cpp-build-all-shared-libs = { cmd = "cmake --build build/debug --config Debug --target ALL", depends-on = [
"cpp-prepare-shared-libs",
] }
cpp-clean = "rm -rf build CMakeCache.txt CMakeFiles"
cpp-build-tests = { cmd = "cmake --build build/debug --config Debug --target rerun_sdk_tests", depends-on = [
"cpp-prepare",
] }
cpp-build-examples = { cmd = "cmake --build build/debug --config Debug --target examples", depends-on = [
"cpp-prepare",
] }
cpp-build-snippets = { cmd = "cmake --build build/debug --config Debug --target snippets", depends-on = [
"cpp-prepare",
] }
cpp-build-log-benchmark = { cmd = "cmake --build build/release --config Release --target log_benchmark", depends-on = [
"cpp-prepare-release",
] }
cpp-build-plot-dashboard-stress = { cmd = "cmake --build build/release --config Release --target plot_dashboard_stress", depends-on = [
"cpp-prepare-release",
] }
cpp-test = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/debug/rerun_cpp/tests/rerun_sdk_tests", depends-on = [
"cpp-build-tests",
] }
cpp-log-benchmark = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/release/tests/cpp/log_benchmark/log_benchmark", depends-on = [
"cpp-build-log-benchmark",
] }
cpp-plot-dashboard = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/release/tests/cpp/plot_dashboard_stress/plot_dashboard_stress", depends-on = [
"cpp-build-plot-dashboard-stress",
] }
cpp-build-and-test-all = { depends-on = ["cpp-build-all", "cpp-test"] }
cpp-docs = { cmd = "doxygen docs/Doxyfile && echo '***************\nSuccess!\nOpen ./rerun_cpp/docs/html/index.html in your browser.'", cwd = "rerun_cpp" }
cpp-fmt = "fd --extension h --extension hpp --extension c --extension cpp --exec clang-format -i"
cpp-fmt-check = "fd --extension h --extension hpp --extension c --extension cpp --exec clang-format --dry-run --Werror"
[feature.cpp.target.win-64.tasks]
cpp-prepare-msvc = "cmake -G 'Visual Studio 17 2022' -B build-msvc -S ."
################################################################################
# DEPENDENCIES
################################################################################
[feature.base.dependencies]
# IMPORTANT: do not add any dependencies here that may break CI. All dependencies should be available on all supported
# platforms (including linux-aarch64), or added conditionally.
#
# Hints:
# - To check a given package, go to the package on https://prefix.dev/channels/conda-forge/. It should support:
# - linux-64 and linux-aarch64
# - osx-64 and osx-arm64
# - win-64
# - Some pure Python packages may wrongly be tagged as platform-specific. In this case, use `[pypi-dependencies]`
# instead (e.g. `nox`).
# - If a package is only used for a very specific CI job on a specific target, include it under that target (e.g.
# `meilisearch`).
# - Last resort, use a feature to conditionally include a dependency (e.g. `taplo`).
aiohttp = ">=3.9.3,<3.10" # For `zombie_todos.py`
attrs = ">=23.1.0"
clang = "16.0.6.*"
clang-tools = "16.0.6.*" # clang-format
cmake = "3.27.6.*"
colorama = ">=0.4.6,<0.5"
doxygen = "1.9.7.*" # Make sure to use a version that is compatible with the theme we're using, see https://github.com/jothepro/doxygen-awesome-css/blob/v2.2.1/README.md
fd-find = ">=10.1.0" # Used by `cpp-fmt` to find C++ files
ffmpeg = ">=7.1.0,<8" # Needed for consistent results on tests that use ffmpeg to render video.
flatbuffers = ">=23"
gitignore-parser = ">=0.1.9"
gitpython = ">=3.1.40"
jinja2 = ">=3.1.3,<3.2" # For `build_screenshot_compare.py` and other utilities that build websites.
lychee = "0.23.0.*"
mypy = "1.14.1.*"
nasm = ">=2.16" # Required by https://github.com/memorysafety/rav1d for native video support
pyyaml = ">=6.0" # For `check_doc_redirects.py`
nbstripout = "*"
ninja = "1.11.1.*"
libprotobuf = "6.*" # Provides `protoc` compiler needed by lance and prost-build
protobuf = "6.*" # Python bindings for protobuf
prettier = ">=3.6"
python = "=3.11" # We use the latest Python version here, so we get the latest mypy etc, EXCEPT 3.12 is too new for some of our examples. We run our CI tests on ALL supported versions though.
ruff = "0.15.7.*"
rich = "==14.2.0"
semver = ">=3.0,<3.1"
taplo = "=0.9.1"
tomli = "=2.3.0"
tomlkit = "0.12.3.*"
tqdm = ">=4.66.2,<4.67" # For displaying progress in various utility scripts.
ty = "==0.0.31"
typing_extensions = ">4.5"
typos = ">=1.45.1"
urllib3 = "<2.6.0" # TODO(googleapis/google-resumable-media-python#491)
gh = ">=2.79.0,<3"
binaryen = "117.*" # for `wasm-opt`
nodejs = ">=22.0" # rerun_notebook needs nodejs to build the wheel
packaging = ">=24.0,<25" # For `publish_wheels.py`
pip = ">=23"
wheel = ">=0.38,<0.39"
[feature.base.pypi-dependencies]
cryptography = "==38.0.4" # For `upload_image.py` -- note: version is constrained by hatch dependency
google-cloud-storage = "==2.9.0" # For `upload_image.py`
hatch = "*" # For `rerun_notebook`
pillow = ">=12.2.0,<13" # For `upload_image.py`
py-spy = ">=0.4" # For profiling Python benchmarks
pygithub = "==2.6.1" # Among others for `sync_release_assets.py`.
requests = ">=2.31,<3" # For `thumbnails.py` & `upload_image.py`
rerun-pixi-env = { path = "rerun_pixi_env", editable = true }
uv = "==0.9.17"
[target.linux-64.dependencies]
patchelf = ">=0.17"
meilisearch = "1.5.1.*" # not available for linux-aarch64
buf = "1.*" # not available for linux-aarch64
[target.osx-arm64.dependencies]
buf = "1.*" # not available for linux-aarch64
libgfortran5 = ">=14" # Fixes issues with OpenCV
meilisearch = "1.5.1.*" # not available for linux-aarch64
llvm-tools = "16.0.6.*" # Various Wasm targets fail on mac without llvm-ar
[target.win-64.dependencies]
buf = "1.*" # not available for linux-aarch64
[feature.cpp.target.linux-64.dependencies]
sysroot_linux-64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[feature.cpp.target.linux-aarch64.dependencies]
sysroot_linux-aarch64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[feature.cpp.target.unix.dependencies]
ninja = "1.11.1.*"
# Use system compilers for C/C++.
#
# This is important in particular on MacOS, where it's really hard to get a custom clang to work,
# due to various peculiarities of the linker setup.
# (i.e. I have figured out to pick up the right compiler by setting CC/CXX env vars, but couldn't get it to link!)
#
# Note however, that as of writing, our web viewer build needs to use a newer compiler than what MacOS ships with,
# so we have to make sure that anything building the web viewer does **not** use these packages.
c-compiler = "1.6.0.*"
cxx-compiler = "1.6.0.*"
[feature.cpp.target.win-64.dependencies]
vs2022_win-64 = "19.37.32822.*"
[feature.cpp.pypi-dependencies]
ghp-import = "==2.1.0" # for CI documentation handling
# test