Add a `dynamic-mod-rust` example (Rust dynamic module HTTP filter)
Maintainer antworten meist innerhalb von 1 Tag
@phlax arbeitet bereits daran.
Seit 26.9.2026.
- #1441 von @copilot-swe-agent — ohne Merge geschlossen
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Summary
This repo currently has two examples of extending Envoy with custom code, both in C++:
filter-cc— a statically linked in-tree filter, built with Bazel against the Envoy sourcewasm-cc— a proxy-wasm filter
What is missing is an example of a dynamic module, which is the more common pattern for out-of-tree extensions these days. Dynamic modules are shared libraries loaded at runtime via envoy.filters.http.dynamic_modules and have an official Rust SDK (envoy-proxy-dynamic-modules-rust-sdk). We should add a dynamic-mod-rust sandbox alongside the existing two.
Proposed layout
Mirror the wasm-cc sandbox structure so it slots into the existing docs/verify tooling:
dynamic-mod-rust/
Cargo.toml
Cargo.lock
src/lib.rs # minimal HTTP filter: add a response header + append to body
Dockerfile-proxy # multi-stage: build the .so, copy into envoyproxy/envoy:dev
Dockerfile-echo # same echo backend as wasm-cc
docker-compose.yaml
envoy.yaml # DynamicModuleFilter config
example.rst
verify.sh
README.md
envoy.yamlusesenvoy.filters.http.dynamic_moduleswithDynamicModuleFilter(dynamic_module_config.name,filter_name,filter_configasgoogle.protobuf.Struct).Dockerfile-proxybuilds the module in arust:stage and copieslib<name>.sointo the Envoy image, settingENVOY_DYNAMIC_MODULES_SEARCH_PATHaccordingly.verify.shfollows the same shape aswasm-cc/verify.sh(check header/body from the filter, then optionally modify → rebuild → re-check).example.rstshould link to the dynamic modules arch overview and the Rust SDK docs, and note that the SDK version must match the Envoy ABI version of the image being used.
No committed binaries
Unlike wasm-cc, which ships a prebuilt x86_64 .wasm in lib/, this example should not commit any built artifacts. Committing binaries is generally bad practice, and a Rust dynamic module build is lightweight enough (no Bazel, no Envoy source checkout) that it can be built as part of docker compose up --build in reasonable time. This also removes the arch-specific caveat that wasm-cc carries.
Wiring
- Add
dynamic-mod-rusttoEXAMPLE_TESTSin the rootBUILDso it runs with the normalenvoy_examplesverification. Since it builds with cargo rather than Bazel, it should not need to be added to the_verify_build.ymlmatrix, and noMODULE.bazel/ rootbazel_depis required. :configsanddocs_rstglobs should pick upenvoy.yamlandexample.rstautomatically.- Consider adding a
cargoecosystem entry fordynamic-mod-rust/to.github/dependabot.yaml.
References
- Dynamic modules arch overview: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/dynamic_modules
- Rust SDK: https://github.com/envoyproxy/envoy/tree/main/source/extensions/dynamic_modules/sdk/rust
- Reference examples: https://github.com/envoyproxy/dynamic-modules-examples (note its
release/v<version>branching for ABI compatibility) - Upstream tracking issue: https://github.com/envoyproxy/envoy/issues/38392
- Vorherrschende Sprache
- Shell
- Sterne
- 75
- Forks
- 39
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 31
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus envoyproxy/examples
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
envoyproxy/examples#1640 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
envoyproxy/examples#1629 · 7 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
ci: Allocate example host ports dynamically instead of the static 1LLBN schemeEvtl. wieder frei @phlax hat das vor 49 Tagen übernommen, und es ist kein Pull Request offen. Offenenhancement
envoyproxy/examples#1516 · 1 Reaktion · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
envoyproxy/examples#1515 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ai-transcoder sandbox: requirements for resubmissionEvtl. wieder frei @phlax hat das vor 49 Tagen übernommen, und es ist kein Pull Request offen. Offenenhancement
envoyproxy/examples#1499 · 3 Kommentare · 1 Reaktion · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in envoyproxy/examples
Ähnliche Issues
-
area:app bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug introduced: 4.2.0 or earlier P2 ready-for-agent S
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
open-astro/AlpacaBridge#3057 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
github/gh-aw-firewall#12415 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 92/100
tldr-pages/tldr#25620 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag