Skip to content

Add native Extism Erlang host SDK - #1

Merged
nilslice merged 2 commits into
mainfrom
cursor/erlang-sdk-f796
Oct 13, 2026
Merged

nilslice merged 2 commits into
mainfrom
cursor/erlang-sdk-f796

Conversation

@nilslice

@nilslice nilslice commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Ports the combined Extism Erlang SDK work from nilslice/agent-plan-executor#13 into this repository.

This is a native Extism host SDK for Erlang/OTP. Plugins run on erlang_wasm. The library implements the Extism kernel, host env, manifests, host functions, and WASI on that engine.

Requires OTP 29+.

API sketch

{ok, P} = extism:open("priv/plugins/count_vowels.wasm"),
{ok, Out} = extism:call(P, count_vowels, <<"Hello, World!">>),
ok = extism:close(P).

The default handle lives in the calling process (no gen_server hop). start_link/2 and child_spec/3 wrap the same API in an OTP worker when you want a name or supervisor.

What's included

  • Plugin load/call API (open/new/call/close) from path, bytes, WAT, bundled name, or manifest
  • Host functions (PDK-shaped binaries or raw i64 offsets)
  • Manifest config, allowed hosts, WASI filesystem, HTTP
  • Bundled guest plugins from official Extism PDK/SDK repos (priv/plugins/SOURCES.md)
  • Common Test suite covering kernel WAT, Rust PDK guests, host fns, WASI/HTTP, and OTP workers
  • GitHub Actions CI (.github/workflows/ci.yml) that compiles, runs rebar3 ct, and the count-vowels example on OTP 29.1.1

Develop

rebar3 compile
rebar3 ct
rebar3 shell

GitHub links in rebar.config and extism.app.src now point at this repo instead of the plan-executor tree.

Verification

Compiled and tested locally on OTP 29.1.1 with rebar3 3.27.0:

  • rebar3 compile — success
  • rebar3 ct — 20/20 Common Test cases passed (kernel WAT, Rust PDK guests, host functions, WASI/HTTP, OTP worker API)
  • escript examples/count_vowels.escript "Hello, World!" — {"count":3,"total":3,"vowels":"aeiouAEIOU"}
  • Runtime versions: SDK 0.1.0, kernel v1.7.0
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 13, 2026 03:02
Port the combined agent-plan-executor Extism work into this repo: plugin
load/call API, kernel and host env, manifests, host functions, WASI, OTP
wrappers, bundled guest plugins, and Common Test coverage.

Co-authored-by: Steve Manuel <nilslice@users.noreply.github.com>
Use setup-beam with OTP 29.1.1 and rebar3 3.27.0 so CI matches
.tool-versions. Cache rebar artifacts and upload Common Test logs
when the suite fails.

Co-authored-by: Steve Manuel <nilslice@users.noreply.github.com>
@nilslice
nilslice marked this pull request as ready for review October 13, 2026 03:15
@nilslice
nilslice merged commit dd510dc into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants