Add a `dynamic-mod-rust` example (Rust dynamic module HTTP filter)
Maintainer thường phản hồi trong vòng 1 ngày
@phlax đang làm issue này rồi.
Từ ngày 26/9/2026.
- #1441 của @copilot-swe-agent — đã đóng, không merge
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Shell
- Star
- 75
- Fork
- 39
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của envoyproxy/examples
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
envoyproxy/examples#1640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky example tests (tracking)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
envoyproxy/examples#1629 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci: Allocate example host ports dynamically instead of the static 1LLBN schemeCó thể làm lại được @phlax đã nhận 49 ngày trước và không có pull request nào đang mở. Đang mởenhancement
envoyproxy/examples#1516 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
envoyproxy/examples#1515 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-transcoder sandbox: requirements for resubmissionCó thể làm lại được @phlax đã nhận 49 ngày trước và không có pull request nào đang mở. Đang mởenhancement
envoyproxy/examples#1499 · 3 bình luận · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của envoyproxy/examples
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
github/gh-aw-firewall#12415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
tldr-pages/tldr#25620 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update README: Sentieon version is now set in the conductor config, not the dxapp.json defaultĐang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
source:reader type:content-error
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stephrobert/blog-roadmap#251 ·