You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-12Lines changed: 35 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,10 @@ make run-gateway
25
25
# Using Go directly
26
26
go run examples/server/gateway/main.go
27
27
28
-
# Using Bazel wrapper directly
28
+
# Using Bazel (with direnv)
29
+
bazel run //examples/server/gateway:gateway
30
+
31
+
# Or without direnv
29
32
./tools/bazel run //examples/server/gateway:gateway
30
33
```
31
34
@@ -54,9 +57,26 @@ See [docs/architecture/STRUCTURE.md](docs/architecture/STRUCTURE.md) for a detai
54
57
-**Go 1.24 or later** (optional, Bazel manages its own Go toolchain)
55
58
-**protoc** and Go plugins (optional, only needed if modifying proto files)
56
59
-**grpcurl** (optional, for manual testing)
60
+
-**direnv** (recommended, to automatically load `.envrc`)
57
61
58
62
**Note**: The project includes `./tools/bazel` (bazelisk wrapper) and `.bazelversion`, so you don't need to install Bazel or Bazelisk separately.
59
63
64
+
#### Using direnv (Recommended)
65
+
66
+
Install direnv and allow the `.envrc` file:
67
+
```bash
68
+
# macOS
69
+
brew install direnv
70
+
71
+
# Add to your shell profile (~/.zshrc or ~/.bashrc)
72
+
eval"$(direnv hook zsh)"# or bash, fish, etc.
73
+
74
+
# In the project directory
75
+
direnv allow
76
+
```
77
+
78
+
With direnv enabled, you can use `bazel` directly instead of `./tools/bazel`.
79
+
60
80
Install optional tools:
61
81
```bash
62
82
# macOS
@@ -128,23 +148,26 @@ go build -o bin/speculator_client ./examples/client/speculator/
128
148
129
149
The project uses **Bzlmod** (not WORKSPACE) for dependency management. Bazel version is pinned at 8.4.1 in `.bazelversion`.
130
150
131
-
The project includes `./tools/bazel` which automatically downloads the correct Bazel version.
151
+
The project includes `./tools/bazel` which automatically downloads the correct Bazel version. If you're using `direnv`, you can simply use `bazel` instead of `./tools/bazel`.
0 commit comments