Stream: git-wasmtime

Topic: wasmtime / issue #12242 Analyze component instantiation t...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 05 2026 at 19:11):

fitzgen opened issue #12242:

After https://github.com/bytecodealliance/wasmtime/pull/12234, we will emit inline constants for immutable+defined globals, but we cannot do the same for immutable+imported without

  1. an analysis (similar to our known imported function analysis) to find the globals that the satisfy that import
  2. checking that the import is always satisfied with a global of the same value
  3. checking that the module is not exported (which would allow instantiating it in host code with a global of a different value)

One possible future extension (not for this PR of course) would be to do something similar to the inliner to record that, even for imported globals, if the definition is in-wasm itself then we can also use the constant value. (e.g. dynamic-linking-using modules in components have this use case a lot)

_Originally posted by @alexcrichton in https://github.com/bytecodealliance/wasmtime/pull/12234#discussion_r2662297240_


Last updated: Jan 09 2026 at 13:15 UTC