Wasm Plugin SDK Overview
SocialPoster plugins are WebAssembly modules compiled against the 1.0.0 Extism-based Plugin ABI. Any language targeting wasm32-unknown-unknown or wasm32-wasip1 with an Extism PDK (such as Rust, Go, or Zig) is supported.
Requirements & Constraints
| Requirement | Value |
|---|---|
| Binary format | WebAssembly (\0asm magic header) |
| Maximum file size | 1,048,576 bytes (1 MB) |
| Required guest exports | describe, validate_auth, publish, delete_post |
| Filesystem access | None (media is streamed via sp_media_chunk) |
| Network access | HTTPS via sp_http restricted to allowed_domains |
describe() timeout |
2000ms |
Project Setup (Rust)
Create a cdylib crate with extism-pdk, serde, and serde_json:
[package]
name = "socialposter-bluesky-custom"
version = "1.0.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
extism-pdk = "1.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Build the .wasm binary:
rustup target add wasm32-unknown-unknown
cargo build --release --target wasm32-unknown-unknown
The compiled module is written to target/wasm32-unknown-unknown/release/<crate_name>.wasm.
Local Testing
- Open SocialPoster on your desktop and enable Settings → Developer Mode.
- Click Load Local .wasm and select your compiled binary.
- Verify that your icon, brand colour, and credential fields appear under Settings → Accounts, then test Validate Credentials and a draft post.
Publishing to the Plugin Catalogue
- Sign in with GitHub to open the Author Dashboard.
- Claim a unique URL-safe slug (lowercase letters, numbers, and hyphens, max 48 characters) with a short summary.
- Upload your compiled
.wasmbinary with Markdown release notes (the SemVer version is extracted automatically fromdescribe()). - Once automated verification passes, your plugin is signed and listed in the Plugin Catalogue and SocialPoster's desktop Plugin Library.