Skip to content

Wrong Parser API names (CRITICAL) #1

@mrhapile

Description

@mrhapile

❌ Problem

You are using:

WasmEdge_ParserCreate(nullptr)
WasmEdge_ParserDelete(ctx)
WasmEdge_ParserParseFromFile(...)

But the actual WasmEdge C API (0.16.x) uses:

WasmEdge_ParserContextCreate()
WasmEdge_ParserContextDelete()
WasmEdge_ParserContextParseFromFile()

Why this matters

This will cause compile-time errors.

✅ Fix

Update all parser calls:

ParserPtr parserCtx(WasmEdge_ParserContextCreate());
...
WasmEdge_ParserContextParseFromFile(parserCtx.get(), &rawAstModule, filename.c_str());

And the deleter:

void operator()(WasmEdge_ParserContext* ctx) const {
    if (ctx) WasmEdge_ParserContextDelete(ctx);
}

📌 Severity: Critical
📌 Phase impact: Phase 2, 3
📌 Fix required before PR

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions