Skip to content

feat: add the webassembly plugin api - #1

Merged
NaySurGithub merged 1 commit into
mainfrom
feat/wasm-plugins
Nov 4, 2026
Merged

NaySurGithub merged 1 commit into
mainfrom
feat/wasm-plugins

Conversation

@NaySurGithub

Copy link
Copy Markdown
Contributor

Summary

Adds the API for WebAssembly plugins next to the other languages:

  • wasm/falcon.wit (falcon:plugin@1.3.3): the plugin API in WIT, mirroring falcon_api.h except runAsync (a Wasm store must never be entered from two threads)
  • wasm/c/falcon_wasm.{h,c}: a small C layer over the wit-bindgen C bindings, so a plugin only writes falcon_enable() and its handlers
  • examples/wasm/HelloWasm: a complete plugin of about 20 lines, built with its build.sh (needs wit-bindgen, clang with the wasm32 target and a WASI sysroot)

The server side is Falcon-MC/Falcon#26.

Not verified

The Wasm example is not built by CI; it was built locally on macOS arm64 with Homebrew clang and wasi-libc.

Test plan

Run examples/wasm/HelloWasm/build.sh with WASI_SYSROOT set, put build/HelloWasm.wasm and plugin.json in plugins/HelloWasm/ on a server with #26, start it: "HelloWasm is enabled" is logged and /hellowasm answers "Hello from WebAssembly!".

AI disclosure

Prepared with Claude Opus 5.5.

@NaySurGithub
NaySurGithub merged commit d1eeaae into main Nov 4, 2026
10 checks passed
@NaySurGithub
NaySurGithub deleted the feat/wasm-plugins branch November 4, 2026 22:57
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.

1 participant