Skip to content

libextism extism_plugin_call sometimes returns 0 on error. #775

@G4Vi

Description

@G4Vi

This happens when wasmtime trap occurs during execution, for example when an unreachable statement is executed.

At least two of the libextism using sdks expect success when a zero is returned: cpp-sdk and perl-sdk

The python-sdk uses the presence of an error string also to determine if there's an error.

I can update the sdks to check for an error string instead, but I think it would be preferable to avoid the need to call extism_plugin_error every time you call a plugin function. The existing documentation for extism_plugin_call states Returns 0 when the call is successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions