Plugins
A plugin is a single WebAssembly file. The same file runs in the Mac app, in the web app and in rt. It can change requests before sending, comment on responses, contribute tabs and bring importers – in a sandbox, with permissions you see before installing, and without ever seeing a secret value.
- Edition
- Free
- Format
- one
.wasmfile with an embedded manifest - Permissions
- network (hosts), storage, variables
- Manage
- Manage plugins… in the command palette
- Write
- Rust with the plugin SDK
What a plugin can do
| Extension point | When it runs |
|---|---|
| Prepare | Before every send, after authentication and before signing; it can change the request |
| Response | After every response; it can add notes |
| Tabs | Tabs in the request editor, the response or for the collection, drawn from declarative blocks (text, tables, trees, forms, buttons) |
| Importers | Convert files in the Import dialog and in rt import into a collection, with a loss report |
Prepare and response also run in rt send and rt run, exactly as in the apps; tabs exist only in the apps. One example is the bundled OData plugin for SAP (OData and SAP): the SAP knowledge lives in the plugin, not in the core1.
The sandbox
- No native code2: plugins are WebAssembly only and run in an interpreter that works the same everywhere.
- No file system, no threads and no network except through the host’s HTTP call.
- Every call runs in a fresh instance with a fuel limit and at most 64 MiB of memory.
- Plugins never see secret values: requests and responses reach them masked.
- If a plugin crashes, the host reports it as failed and keeps running.
Permissions
A plugin declares in its manifest what it needs, and you see that before installing it:
| Permission | Allows |
|---|---|
network | HTTP requests to the listed hosts only ({request} means the host of the request being sent) |
storage | A private key-value store per plugin and device |
variables | Reading the non-secret variables in scope |
If an update asks for more permissions, RequestTailor asks again before granting them.
Install and manage
- Choose Manage plugins… in the command palette.
- Click Install from file… and pick the
.wasmfile. - Check the requested permissions and confirm with Install.
- In the same dialog you switch plugins on and off or remove them with Remove.
Installed plugins live in the app’s data folder; the Mac app and rt share them. The web app keeps them in the browser. A switched-off plugin has no tabs, no hooks and no description. The bundled OData plugin is installed but off until you switch it on at first start or here later.
On the command line a plugin also runs without installing it:
rt send request.yml --plugin target/plugins/hello.wasm --pretty
Write a plugin
You write plugins in Rust with the plugin SDK and build them with one command from the core repository:
node scripts/build-plugins.mjs hello # builds plugins/hello to target/plugins/hello.wasm
The full guide with an example, testing tools and versioning rules is in plugins/README.md, the binary interface in crates/rt-plugin/API.md. The plugin API is public and versioned. A TypeScript SDK has the types and a test host; building plugins from TypeScript is not available yet.
See also
- Features at a glance Features · sap
- Docs OData and SAP
- Docs Import
- Docs rt command line
- Sources Plugins2 · OData plugin1