From b80f33d14d0420d5e5b0df49ff33fba8abdda5cf Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 11 Dec 2020 21:04:06 +1000 Subject: [PATCH] document worker and disable it by default --- .bazelrc | 4 ---- docs/development.md | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.bazelrc b/.bazelrc index f40fd1749..4f9c63927 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,10 +4,6 @@ common --experimental_repository_cache_hardlinks # specify python path on Windows for pyo3 compile build:windows --action_env="PYTHON_SYS_EXECUTABLE=c:\\python\\python.exe" -# worker config -build --@io_bazel_rules_rust//worker:use_worker=True -build:windows --worker_quit_after_build - # runfiles are off by default on Windows, and we need them build --enable_runfiles diff --git a/docs/development.md b/docs/development.md index 05d45bc7e..5366766c2 100644 --- a/docs/development.md +++ b/docs/development.md @@ -120,6 +120,27 @@ If you're in one of those folders, you can use the short form: bazel run format ``` +## Development speedups + +If you're frequently switching between Anki versions, you can create +a user.bazelrc file in the top level folder with the following, which will +cache build products and downloads: + +``` +build --disk_cache=~/bazel/ankidisk --repository_cache=~/bazel/ankirepo +``` + +If you're frequently modifying the Rust parts of Anki, you can place the +following in your user.bazelrc file to enable incremental compilation: + +``` +build --@io_bazel_rules_rust//worker:use_worker=True +build:windows --worker_quit_after_build +``` + +The worker support is experimental, so you may need to remove it in future +updates. + ## Audio Audio playing requires `mpv` or `mplayer` to be in your system path.