Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN CC="zig cc -target aarch64-linux-gnu" CXX="zig c++ -target aarch64-linux-gnu
RUN CC="zig cc -target x86_64-linux-gnu" CXX="zig c++ -target x86_64-linux-gnu" CGO_ENABLED=1 GOARCH=amd64 go build -buildmode=c-shared -o /build/amd64_libgo_module.so .

##### Build the final image #####
FROM envoyproxy/envoy-dev:73fe00fc139fd5053f4c4a5d66569cc254449896 AS envoy
FROM envoyproxy/envoy:v1.35-latest AS envoy
ARG TARGETARCH
ENV ENVOY_DYNAMIC_MODULES_SEARCH_PATH=/usr/local/lib
COPY --from=rust_builder /build/${TARGETARCH}_librust_module.so /usr/local/lib/librust_module.so
Expand Down
2 changes: 1 addition & 1 deletion ENVOY_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
73fe00fc139fd5053f4c4a5d66569cc254449896
84305a6cb64bd55aaf606bdd53de7cd6080427a1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dynamic Modules Examples

> Envoy Version: [73fe00fc139fd5053f4c4a5d66569cc254449896] v1.35-dev
> Envoy Version: [84305a6cb64bd55aaf606bdd53de7cd6080427a1] v1.35
>
> Since dynamic modules are tied with a specific Envoy version, this repository is based on the specific commit of Envoy.
> For examples for a specific Envoy version, please check out `release/v<version>` branch, e.g. [`release/v1.34`](https://github.com/envoyproxy/dynamic-modules-examples/tree/release/v1.34).
Expand Down Expand Up @@ -87,6 +87,6 @@ If you want to explicitly specify the docker image, use `ENVOY_IMAGE` environmen
ENVOY_IMAGE=foo-bar-image:latest go test . -v -count=1
```

[73fe00fc139fd5053f4c4a5d66569cc254449896]: https://github.com/envoyproxy/envoy/tree/73fe00fc139fd5053f4c4a5d66569cc254449896
[84305a6cb64bd55aaf606bdd53de7cd6080427a1]: https://github.com/envoyproxy/envoy/tree/84305a6cb64bd55aaf606bdd53de7cd6080427a1
[Envoy]: https://github.com/envoyproxy/envoy
[High Level Doc]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/dynamic_modules
6 changes: 3 additions & 3 deletions go/gosdk/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package gosdk

// Following is a distillation of the Envoy ABI for dynamic modules:
// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi.h
// https://github.com/envoyproxy/envoy/blob/84305a6cb64bd55aaf606bdd53de7cd6080427a1/source/extensions/dynamic_modules/abi.h
//
// Why not using the header file directly? That is because Go runtime complains
// about passing pointers to C code on the boundary. In the following code, we replace
Expand Down Expand Up @@ -161,8 +161,8 @@ import (
"unsafe"
)

// https://github.com/envoyproxy/envoy/blob/73fe00fc139fd5053f4c4a5d66569cc254449896/source/extensions/dynamic_modules/abi_version.h
var version = append([]byte("cb17cd829c177bc6b75a920283a3347b90d5aaa4d5e723eaa33bad31c8c5b9a9"), 0)
// https://github.com/envoyproxy/envoy/blob/84305a6cb64bd55aaf606bdd53de7cd6080427a1/source/extensions/dynamic_modules/abi_version.h
var version = append([]byte("c32cc7696650a6a54653327e6609734a8b32aeb5c80a6a664687636a0d671666"), 0)

//export envoy_dynamic_module_on_program_init
func envoy_dynamic_module_on_program_init() uintptr {
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/envoyproxy/dynamic-modules-example"

[dependencies]
# The SDK version must match the Envoy version due to the strict compatibility requirements.
envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "73fe00fc139fd5053f4c4a5d66569cc254449896" }
envoy-proxy-dynamic-modules-rust-sdk = { git = "https://github.com/envoyproxy/envoy", rev = "84305a6cb64bd55aaf606bdd53de7cd6080427a1" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
rand = "0.9.0"
Expand Down
Loading