feat: Add version information to wasm module

This commit is contained in:
TimothyBanks
2026-07-21 12:02:54 -04:00
parent b00e517b66
commit 1d6829bd55

View File

@@ -812,6 +812,11 @@ struct Version
{
std::string_view name;
std::string_view version;
Version(std::string_view theName, std::string_view theVersion)
: name{theName}, version{theVersion}
{
}
};
uint32_t
@@ -912,9 +917,7 @@ extractVersionInfo(Bytes const& wasmCode)
if (section.name == kCommonLib || section.name == kEscrowLib)
{
versions.emplace_back(
Version{
.name = section.name,
.version = std::string_view{section.payload.data(), section.payload.size()}});
section.name, std::string_view{section.payload.data(), section.payload.size()});
}
// Just read until we have found all the information we are looking for.