alexcrichton opened issue #13501:
In https://github.com/bytecodealliance/wasmtime/pull/13487 the processing of
ConstExprhas moved from the runtime to compiled code. As pointed out here, however, this results in some duplication of processingConstOpinternally within Wasmtime. It should in theory be possible to more-or-less implementFrom<ConstOp> for wasmparser::Operatorand reuse the existing operator translation inFuncEnvironmentinstead of duplicating it intranslate_const_expr. This isn't being done in #13487, but it's still a worthwhile thing to look into in the future. The main blocker right now is creation of theFuncValidatorwhichtranslate_operatorrequires, likely resulting in modifications towasmparserto create a special kind of validator for const expressions (or something like that)
alexcrichton added the wasmtime label to Issue #13501.
Last updated: Jun 01 2026 at 09:49 UTC