ReDevPlugin Worker SDK
redevplugin-worker-sdk is the Rust SDK for backend workers that run inside the
sandboxed ReDevPlugin WASM runtime. It owns the plugin_api=1 WASM request decoding, canonical
success and error responses, buffer allocation, worker exports, and brokered
storage, filesystem, and network APIs over the single redevplugin.io import
module.
Versioned Dependency
Pin the SDK to the same immutable ReDevPlugin release used by the host:
[]
= "=3.1.0"
= "1.0"
Resolve the crate from the same formal registry publication indexed by the platform release manifest as the Host and runtime source crate. Do not substitute a Git checkout or local path dependency.
Worker Entry Point
use ;
use json;
export_worker!;
Compile the worker for wasm32-unknown-unknown. The generated module exports
the allocator, deallocator, and invocation functions required by the current
plugin_api=1 WASM ABI.
Brokered APIs
storage::files,storage::kv, andstorage::sqliteuse Host-minted storage grants for stores declared by the plugin manifest.http,websocket,tcp, andudpexpose the current Host-controlled network APIs without a second network dispatcher.- Workers never receive bearer credentials, raw sockets, ambient filesystem access, or direct network access.
The SDK exposes these high-level APIs through rdp_call_v1, rdp_read_v1,
rdp_write_v1, rdp_seek_v1, rdp_close_v1, and rdp_last_error_v1. Worker
code does not import separate storage or network modules.
The SDK returns structured WorkerError values. Broker failures retain their
stable platform code and user-safe message instead of exposing transport or
credential details.
Explicit Network Connectors
Every HTTP, WebSocket, TCP and UDP open option requires connector_id. It must name a connector in the current method's broker_access.network; a plugin-wide network.client grant alone never authorizes an outbound request. HTTP checks the actual method on each redirect. Persistent operation names are http / http_stream, websocket, tcp, and udp; there are no legacy operation aliases.
The Host owns target policy, DNS classification, exact-address dialing and bounded connection lifetime. Close, cancellation, expiry and revocation interrupt pending I/O. A streaming body cannot be replayed through a 307/308 redirect. After a write is dispatched, an error may mean the remote peer already received bytes: inspect the result before deciding on a new application-level operation.