-
Run Hello World:
bazel run //hello_world
-
Run Hello World Axum app:
bazel run //axum_app
-
Format:
bazel run @rules_rust//:rustfmt
-
Check formatting:
bazel build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect --output_groups=rustfmt_checks //...
-
Run the Clippy linter on all targets:
bazel build --output_groups=clippy_checks //...
-
Regenerate rust-analyzer config:
bazel run @rules_rust//tools/rust_analyzer:gen_rust_project
-
Repin dependencies:
CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
-
Figure out how to build multiple profiles. Is the macro used in axum_app how it is supposed to be?
-
Figure out how to run and debug from inside VSCode. Some info is available in a Github issue
-
Figure out how to build for linux-amd64 from MacOS M1
A Github issue describes a problem with finding build targets in vscode. There are two ways to fix it:
- Force sharing of bazel server (comment)
- Add a line to
.bazelignore
, according to another comment on the same issue.
Both worked for me, choosing to stick with vscode option!