update rules_rust with worker refactor
If you were using the optional Rust worker support, please see the change to development.md
This commit is contained in:
parent
bcb1a2a329
commit
6f7a4bf29e
14
.bazelrc
14
.bazelrc
|
@ -26,9 +26,17 @@ test --test_output=errors
|
|||
# don't add empty __init__.py files
|
||||
build --incompatible_default_to_explicit_init_py
|
||||
|
||||
# faster for .ui file generation, but may sacrifice correctness
|
||||
#--genrule_strategy=standalone
|
||||
|
||||
build:ci --show_timestamps --isatty=0 --color=yes --show_progress_rate_limit=5
|
||||
|
||||
# incrementally compile Anki crates in fastbuild mode, but not release mode.
|
||||
# The worker must be separately enabled; see docs/development.md
|
||||
build -c fastbuild --@rules_rust//worker:include_regex=anki.*|rsbridge
|
||||
build:opt -c opt --@rules_rust//worker:include_regex=no-crates-please
|
||||
build --worker_max_instances=Rustc=HOST_CPUS*0.5
|
||||
|
||||
# the TypeScript workers on Windows choke when deps are changed while they're
|
||||
# still running, so shut them down at the end of the build. Also fixes issues
|
||||
# with the optional Rust worker.
|
||||
build:windows --worker_quit_after_build
|
||||
|
||||
try-import %workspace%/user.bazelrc
|
||||
|
|
|
@ -149,11 +149,11 @@ 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:
|
||||
following in your user.bazelrc file to enable incremental compilation
|
||||
when using ./run.
|
||||
|
||||
```
|
||||
build --@rules_rust//worker:use_worker=True
|
||||
build:windows --worker_quit_after_build
|
||||
build --@rules_rust//worker:cache_root=/path/to/folder/to/store/temp/files
|
||||
```
|
||||
|
||||
The worker support is experimental, so you may need to remove it in future
|
||||
|
|
|
@ -33,11 +33,11 @@ def register_repos():
|
|||
maybe(
|
||||
http_archive,
|
||||
name = "rules_rust",
|
||||
strip_prefix = "rules_rust-anki-2021-03-27-2",
|
||||
strip_prefix = "rules_rust-anki-2021-03-30",
|
||||
urls = [
|
||||
"https://github.com/ankitects/rules_rust/archive/anki-2021-03-27-2.tar.gz",
|
||||
"https://github.com/ankitects/rules_rust/archive/anki-2021-03-30.tar.gz",
|
||||
],
|
||||
sha256 = "435cbefb4154a51f2f019c831a9ec3248724a90415f13858030562b14d6416bf",
|
||||
sha256 = "ad6286615fd21f71db4490207aa8d5ecdf5f526643cd65d682458d92aa84ff85",
|
||||
)
|
||||
|
||||
# python
|
||||
|
|
|
@ -8,5 +8,5 @@ test -e WORKSPACE || (
|
|||
)
|
||||
|
||||
rm -rf bazel-dist
|
||||
bazel build -c opt --@rules_rust//worker:use_worker=False dist
|
||||
bazel build --config opt dist
|
||||
tar xvf bazel-bin/dist.tar
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
set -e
|
||||
|
||||
BUILDARGS="-c opt --@rules_rust//worker:use_worker=False" $(dirname $0)/../run $*
|
||||
BUILDARGS="--config opt" $(dirname $0)/../run $*
|
||||
|
|
Loading…
Reference in New Issue