Sandbox where I'm learning how to set up bazel, use docker, and get the two of them working nicely with rust and protocol buffers.
Goals
- Manage external proto dependencies in a sane way.
- Build and run images locally using just bazel targets.
- Build rust binaries using just bazel targets.
- Rust binaries can use protocol buffers.
- Frontend & Backend deployable via bazel.
- Backend Rust Web Server running in docker.
- Docker container for postgres, callable by rust.
- Grpc Server in Docker Container.
- Grpc Bridge
- Codegen for rust procol buffer clients.
- Protocol buffer dependency management (with buf)
- Swaggerui - https://petstore.swagger.io/
- Bazel for builds.
- Get rd/proto building with bazel.
- rd/grpc Building with bazel
- Get rd/proto/grpc_gateway building/running via bazel
- Generate gatway's server.go file from .proto files inputs (I think buf can do this?)
- Rule to build .image for go server for binary generated above.
- Start generating swagger file with buf via bazel (gateway.gen.yaml).
- Improve docker/docker_run.sh so it uses args/flags/options etc...
- Get docker compose runable from bazel
- Generate image file.
- Build rule to load images into docker
- Build rule that generates docker.compose given a list of image docker_run targets.
- Build rule that runs docker compose
- Get working frontend + backend example using all of the above
- GRPC Backend
- GRPC Proxy Gateway
- Frontend examples calling via GRPCWEB.
- Offline batch script example calling via http using gateway proxy.
- Build rule to deploy an image as a server to Google Cloud Run
- Bind IP V6 address for grpc inside docker.
- Migrate to bzmod (if rules_rust is stable enough).
- Debug rust-analyzer having issues with generated source files.
- Docker/Image issues for rust binaries
- Bazel built images on docker_rules (distroless_cc image) run into
GLIBC_2.34 not found
(same for 2.33, 2.32... 2.29).- My ubuntu version:
lsb_release -a
- Ubuntu 22.04.2 LTS
- My GLIBC version:
ldd --version
- Ubuntu GLIBC 2.35-0ubuntu3.1
- My ubuntu version:
- Images built with debian don't treat my binary as a binary (file not found).
- Bazel built images on docker_rules (distroless_cc image) run into
- Neither of the above issues occur for images built with a Dockerfile.
- Images built with oci_container using ubuntu base work fine.