Skip to content

How build plugin with native go toolchain? #58

Description

@aagumin

I want call my go plugin with extism

extism call plugin.wasm afsync --input='{"once":false,"restore":false}' --wasi --log-level=debug -v --config s3bucket=abc

TinyGo not support net/http , i try

 GOOS=wasip1 GOARCH=wasm go build -o plugin.wasm main.go

output

extism call plugin.wasm afsync --input='{"once":false,"restore":false}' --wasi --log-level=debug -v --config s3bucket=abc
2025/12/23 11:26:00 Adding wasm file to manifest: plugin.wasm
2025/12/23 11:26:00 Adding allowed hosts: []
2025/12/23 11:26:00 Adding config key s3bucket=abc
2025/12/23 11:26:00 Setting EXTISM_ENABLE_WASI_OUTPUT
2025/12/23 11:26:00 Creating plugin
2025/12/23 11:26:03 Got 30 bytes of input data
2025/12/23 11:26:03 Calling afsync
2025/12/23 11:26:03 Calling function : afsync
runtime: wasmexport function called before runtime initialization
        call _start first
Error: wasm error: unreachable
wasm stack trace:
        .runtime.abort(i32) i32
        .runtime.notInitialized()
        .afsync() i32
returned non-zero exit code: 1
make: *** [test] Error 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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