bazel run

Seto Elkahfi committed Aug 2, 2024 at 19:12 UTC 02acda01b817ab305e57dccbaf090e754976f6ac
5 files changed +19 -13
MODULE.bazel
+3 -9
@@ -73,20 +73,14 @@ use_repo(maven, "maven")
73 # Rules rust
74 rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
75 rust.toolchain(edition = "2021")
76 -use_repo(
77 - rust,
78 - "rust_toolchains",
79 -)
76 +use_repo(rust, "rust_toolchains")
77
78 register_toolchains("@rust_toolchains//:all")
79
83 -crate = use_extension(
84 - "@rules_rust//crate_universe:extension.bzl",
85 - "crate",
86 -)
80 +crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
81 crate.from_cargo(
82 name = "rust_axum_crates",
83 cargo_lockfile = "//backend/rust-axum:Cargo.lock",
84 manifests = ["//backend/rust-axum:Cargo.toml"],
85 )
92 -use_repo(crate, "crates")
\ No newline at end of file
86 +use_repo(crate, "rust_axum_crates")
\ No newline at end of file
MODULE.bazel.lock
+1 -1
@@ -2670,7 +2670,7 @@
2670 "@@rules_rust~//rust:extensions.bzl%rust": {
2671 "general": {
2672 "bzlTransitiveDigest": "x5CZ5frsdfE+euSBsq9NGoTkOGq0LPJCRK801dXYfjg=",
2673 - "usagesDigest": "96OW3T1Wlf7mr4NG6feQBLj1+XKpIHbixWvTHD+v0k4=",
2673 + "usagesDigest": "KglY06bqV0qA7mCTm0UMDOs+jmkOsHszT5r4dvjiJiw=",
2674 "recordedFileInputs": {},
2675 "recordedDirentsInputs": {},
2676 "envVariables": {},
README.md
+3 -2
@@ -15,10 +15,11 @@ git lfs pull
15
16 ## How to use
17
18 -If you're new to Bazel, read [the documentation](https://bazel.build/docs). Otherwise, query all targets:
18 +If you're new to Bazel, read [the documentation](https://bazel.build/docs). Otherwise, query all targets in a given platform:
19
20 ```bash
21 -bazel query //...
21 +bazel query //backend/...
22 +bazel query //frontend/...
23 ```
24
25 ### Tauri
backend/README.md new
+11
@@ -0,0 +1,11 @@
1 +# Backend repositories
2 +
3 +1. app: a Ruby on Rails app.
4 +2. rust-axum: a Rust axum app.
5 +
6 +## Rust
7 +
8 +```bash
9 +$ bazel run //backend/rust-axum:app
10 +$ curl 127.0.0.1:3000
11 +```
\ No newline at end of file
backend/rust-axum/BUILD
+1 -1
@@ -1,5 +1,5 @@
1 load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc")
2 -load("@crates//:defs.bzl", "all_crate_deps")
2 +load("@rust_axum_crates//:defs.bzl", "all_crate_deps")
3
4 package(default_visibility = ["//visibility:public"])
5