

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# GitHub Copilot instructions for envoyproxy/envoy23**Note:** These instructions are specifically for GitHub Copilot's agent/workspace environment, not for developers using Copilot in VS Code or other IDEs. For general development setup, see [DEVELOPER.md](https://github.com/envoyproxy/envoy/blob/main/DEVELOPER.md).45## Repository overview67This repository contains the Envoy proxy, a cloud-native high-performance edge/middle/service proxy. It includes:89- **source/** - Core C++ implementation of Envoy proxy10- **test/** - Comprehensive test suite including unit, integration, and performance tests11- **api/** - Protocol buffer definitions for Envoy's APIs (xDS, filters, etc.)12- **bazel/** - Bazel build configurations, rules, and toolchain definitions13- **contrib/** - Community-contributed extensions14- **mobile/** - Envoy Mobile implementation15- **tools/** - Development tooling, scripts, and utilities16- **docs/** - Documentation source files1718## Build system1920This repository uses **Bazel** as its primary build system.2122### Running Bazel commands in Copilot's local environment2324**IMPORTANT:** The key capability for GitHub Copilot is to run Bazel commands directly in the local workspace to build, test, and validate changes.25**IMPORTANT:** You MUST run `/tmp/fix-bazel-truststore.sh` before the first time you issue a bazel command!!!26**IMPORTANT:** Many bazel targets will be very slow/expensive to run/build/test - only test with bazel when told to.2728### Bazel configuration files2930- `.bazelrc` - Repository-wide Bazel configuration with build flags and platform settings31- `user.bazelrc` - Optional user-specific overrides (gitignored)32- `.bazelversion` - Specifies the exact Bazel version to use33- `MODULE.bazel` / `WORKSPACE` - Dependency definitions (using bzlmod and WORKSPACE modes)3435### Compiler configuration3637Envoy supports multiple compiler configurations. **Use `--config=clang` by default** unless told otherwise:3839```bash40# Use Clang with libc++ (recommended, use by default)41bazel build --config=clang //source/exe:envoy-static4243# Use GCC with libstdc++ (only if explicitly requested)44bazel build --config=gcc //source/exe:envoy-static45```4647## Language and coding standards4849### C++5051- **Primary Language:** Modern C++ (C++20)52- **Compiler Requirements:** Clang >= 18 or GCC >= 1353- **Standard Library:** libc++ (with Clang) or libstdc++ (with GCC)54- **Style Guide:** See [STYLE.md](https://github.com/envoyproxy/envoy/blob/main/STYLE.md) for comprehensive coding standards5556## Testing5758### Running tests5960```bash61# Run all tests62bazel test --config=clang //test/...6364# Run tests in a specific directory65bazel test --config=clang //test/common/http/...6667# Run a single test target68bazel test --config=clang //test/common/http:async_client_impl_test6970# Run tests with additional logging71bazel test --config=clang --test_output=streamed //test/... --test_arg="--" --test_arg="-l trace"7273# Run tests with IPv4 only74bazel test --config=clang //test/... --test_env=ENVOY_IP_TEST_VERSIONS=v4only7576# Run tests with IPv6 only77bazel test --config=clang //test/... --test_env=ENVOY_IP_TEST_VERSIONS=v6only7879# Disable heap checker80bazel test --config=clang //test/... --test_env=HEAPCHECK=81```8283## Dependencies8485### Dependency locations8687Depdendencies are configured in `bazel/repository_locations.bzl`, for API deps its `api/bazel/repository_locations.bzl`8889See `bazel/repositories.bzl` for setup - eg this is where any patching is controlled.9091If you need to create or update a patch - do the following:9293- checkout the upstream repo at the correct version/commit94- apply any existing patches95- make changes96- diff the changes to the patch file9798Pay attention to how the patch_args are setup in repositories.bzl - some are p0, while others are p1. Prefer p1 when99creating new patches.100101102## Code formatting and linting103104### Format code105106```bash107# Check and fix formatting (recommended for source/, test/, contrib/ changes)108bazel run --config=clang //tools/code_format:check_format -- fix109110# Quick format check (much faster, doesn't fix)111bazel run --config=clang //tools/code:check112113# Check format without fixing114bazel run --config=clang //tools/code_format:check_format -- check115116# Format API files117bazel run --config=clang //tools/proto_format:proto_format -- fix118```119120### Dependency validation121122**Always run dependency checks when adding or updating dependencies:**123124```bash125# Validate dependency metadata126bazel run --config=clang //tools/dependency:validate127128# Run dependency tests129bazel run --config=clang //tools/dependency:validate_test130131# Check for dependency setup/updates132# -v warn: verbosity level, -c release_dates: check release dates, releases: check type133bazel run --config=clang //tools/dependency:check -- -v warn -c release_dates releases134```135136## Development workflow137138### Making changes1391401. **Understand the codebase:**141 - Review [DEVELOPER.md](https://github.com/envoyproxy/envoy/blob/main/DEVELOPER.md) for development guidelines142 - Check [REPO_LAYOUT.md](https://github.com/envoyproxy/envoy/blob/main/REPO_LAYOUT.md) for repository organization143 - Read [CONTRIBUTING.md](https://github.com/envoyproxy/envoy/blob/main/CONTRIBUTING.md) for contribution guidelines1441452. **Build and test locally:**146```bash147 # Build Envoy (this is slow/expensive)148 bazel build --config=clang //source/exe:envoy-static149150 # Run relevant tests (often slow/expensive - depending on test)151 bazel test --config=clang //test/path/to/relevant/tests/...152153 # Quick format check154 bazel run --config=clang //tools/code:check155```1561573. **Run Envoy locally:**158159 Unless you're testing a build, download a pre-built binary from the [releases page](https://github.com/envoyproxy/envoy/releases):160161```bash162 # Download latest release (recommended for testing)163 wget https://github.com/envoyproxy/envoy/releases/latest/download/envoy-static-linux-x86_64164 chmod +x envoy-static-linux-x86_64165 ./envoy-static-linux-x86_64 --config-path /path/to/config.yaml166167 # Or after building locally (takes too long, only if needed)168 ./bazel-bin/source/exe/envoy-static --config-path /path/to/config.yaml169```170171## Common development tasks172173### Adding or updating dependencies1741751. Check [bazel/repository_locations.bzl](https://github.com/envoyproxy/envoy/blob/main/bazel/repository_locations.bzl) for existing dependencies1762. See [bazel/EXTERNAL_DEPS.md](https://github.com/envoyproxy/envoy/blob/main/bazel/EXTERNAL_DEPS.md) for how to add/update dependencies1773. **Always run dependency validation after changes:**178```bash179 # Validate dependency metadata and relationships180 bazel run --config=clang //tools/dependency:validate181182 # Run all dependency checks (recommended)183 ./ci/do_ci.sh deps184```185186## CI and testing187188### Using CI scripts vs direct Bazel189190These are the scripts that are run in CI. They also setup the environment and set the191toolchain config.192193You will have been provided a `user.bazelrc` that should have startup args matching what194using `do_ci.sh` would provide. This ensures dependencies are not re-downloaded.195196#### CI script targets197198```bash199# Run all formatting and pre-checks200./ci/do_ci.sh format201202# Run dependency checks (validation + CVE scanning)203./ci/do_ci.sh deps204205# Development build (compile and test)206./ci/do_ci.sh dev207208# Release testing (as done by CI)209./ci/do_ci.sh release.test_only [OPTIONAL TEST TARGETS]210211# Release build212./ci/do_ci.sh release.server_only213214```215216#### When to use direct Bazel217218Use direct `bazel` commands for:219- **Targeted builds/tests** - Building or testing specific targets220- **Iterative development** - Quick rebuilds during active development221- **Custom configurations** - When you need specific flags not covered by CI scripts222
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| envoyproxy/envoyAGENTS.md · 29k | AGENTS.md | setupbuildtestlint-format+7 | 88/100 | 13 days ago | |
| envoyproxy/envoycompat/openssl/AGENTS.md · 29k | AGENTS.md | buildagent-behaviour | 58/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 14 days ago | |
| rtk-ai/rtk.github/copilot-instructions.md · 75k | Copilot instructions | buildtestlint-formatstyle+2 | 97/100 | 14 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 25 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/copilot-instructions.md · 13 | Copilot instructions | teststyledo-notagent-behaviour+1 | 92/100 | 14 days ago | |
| gasbasd/mtg-utils.github/copilot-instructions.md · 0 | Copilot instructions | setupbuildtestlint-format+3 | 89/100 | 8 days ago | |
| bytedance/deer-flow.github/copilot-instructions.md · 80k | Copilot instructions | setupbuildtestlint-format+6 | 89/100 | 14 days ago | |
| tesseract-ocr/tesseract.github/copilot-instructions.md · 76k | Copilot instructions | setupbuildtestlint-format+5 | 89/100 | 14 days ago | |
| iloveitaly/llm-ide-rules.github/instructions/python.instructions.md · 13 | Copilot instructions | setupstyletypesdo-not | 88/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/envoyproxy-envoy-github-copilot-instructions)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.
Directory