Skip to content

dynamic_modules: Link built-in Rust modules as prefixed rlibs - #48473

Merged
phlax merged 4 commits into
envoyproxy:mainfrom
phlax:dynmod-rlibs
Oct 20, 2026
Merged

phlax merged 4 commits into
envoyproxy:mainfrom
phlax:dynmod-rlibs

Conversation

@phlax

@phlax phlax commented Oct 20, 2026

Copy link
Copy Markdown
Member

No description provided.

phlax added 3 commits October 20, 2026 16:46
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax enabled auto-merge (squash) October 20, 2026 16:40
@phlax
phlax merged commit ec0f57f into envoyproxy:main Oct 20, 2026
27 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 6, 2026
…roxy#48473)

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 6, 2026
…roxy#48473)

Port of envoyproxy#48473 to release/v1.39. Rust code linked into the Envoy binary (the hickory built-in module, the static test modules and now the wasmtime engine) was built as staticlibs, each bundling its own copy of std and the allocator shim, which lld rejects as duplicate symbols once two of them meet in one binary. Built-in modules are now always-linked rlibs built through envoy_rust_static_module; a symbol_prefix build setting and transition compile one SDK instance per module, with the exported hooks named via export_name instead of #[no_mangle] + objcopy renaming, and the SDK's empty rust_runtime staticlib supplies std and the allocator shim exactly once. The wasmtime extension depends on rust_runtime for the same reason (envoyproxy#48434).

Unlike main at the time, this SDK still exported every hook with a plain #[no_mangle], so all 191 hook sites are converted here. The builtin_extensions Cargo.toml crate-type is left as-is to avoid a crate_universe repin; Bazel does not use it.

(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 6, 2026
phlax added a commit to phlax/envoy that referenced this pull request Nov 6, 2026
…s leg

The wasmtime engine is a Rust staticlib, as are the built-in hickory DNS module and the static test modules; each bundles its own Rust runtime and lld rejects the duplicates when two meet in one binary (all_extensions_build_test, envoy-static, the dynamic-modules HTTP integration test). Nothing outside this leg links wasmtime, so disable the hickory extension and skip that integration test for the wasmtime invocations instead of reworking Rust linking on the release branch (main did the latter in envoyproxy#48473; a port is kept on bp-1.39-rust-rlibs).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 9, 2026
…roxy#48473)

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
…roxy#48473)

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
…roxy#48473)

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
jwendell pushed a commit that referenced this pull request Nov 11, 2026
Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit ec0f57f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…s leg

The wasmtime engine is a Rust staticlib, as are the built-in hickory DNS module and the static test modules; each bundles its own Rust runtime and lld rejects the duplicates when two meet in one binary (all_extensions_build_test, envoy-static, the dynamic-modules HTTP integration test). Nothing outside this leg links wasmtime, so disable the hickory extension and skip that integration test for the wasmtime invocations instead of reworking Rust linking on the release branch (main did the latter in envoyproxy#48473; a port is kept on bp-1.39-rust-rlibs).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (envoyproxy#48473).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
The wasmtime tests now build and run on this branch, so `cto.wasmtime`
is added to `.github/config.yml` and to `cto.all`, where it was left
commented out.

As the earlier fixes to the `compile_time_options` target on this branch
did, it leaves the built-in Rust dynamic modules (hickory DNS) and the
static Rust test modules out of the wasmtime build: the wasmtime engine
is a Rust staticlib, as are they, each bundles its own Rust runtime, and
they cannot be linked into one binary. Main reworked how Rust is linked
instead (#48473).

Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants