Add a `dynamic-mod-rust` example (Rust dynamic module HTTP filter)
Les mainteneurs répondent en général sous 1 jour
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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
- Langage dominant
- Shell
- Étoiles
- 75
- Forks
- 39
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 31
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de envoyproxy/examples
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
envoyproxy/examples#1640 ·
Les mainteneurs répondent en général sous 1 jour
-
Flaky example tests (tracking)Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
envoyproxy/examples#1629 · 7 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
ci: Allocate example host ports dynamically instead of the static 1LLBN schemePeut-être à nouveau libre @phlax l’a pris il y a 49 jours, et aucune pull request n’est ouverte. Ouverteenhancement
envoyproxy/examples#1516 · 1 réaction · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
envoyproxy/examples#1515 ·
Les mainteneurs répondent en général sous 1 jour
-
ai-transcoder sandbox: requirements for resubmissionPeut-être à nouveau libre @phlax l’a pris il y a 49 jours, et aucune pull request n’est ouverte. Ouverteenhancement
envoyproxy/examples#1499 · 3 commentaires · 1 réaction · 2 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de envoyproxy/examples
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
github/gh-aw-firewall#12415 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 92/100
tldr-pages/tldr#25620 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Update README: Sentieon version is now set in the conductor config, not the dxapp.json defaultOuvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
source:reader type:content-error
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
stephrobert/blog-roadmap#251 ·