Skip to content

Commit 8ccc266

Browse files
authored
feat: Adds WASM based plugins, replacing Lua
* feat: Moves to wasm plugin architecture * fix: Fixes permissions on husky scripts * docs: Adds changeset notes * docs: Adds note for taskless plugin authoring * test: Disables WASI warning on test * chore: Cleans up testing server to use generated config * chore: Adds runSandbox to simplify hook execution code * fix: Makes sandbox crashes safe via .allSettled
1 parent e4fd99c commit 8ccc266

19 files changed

+4912
-4129
lines changed

.changeset/giant-pillows-taste.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
"@taskless/loader": patch
3+
---
4+
5+
Moves to wasm plugin system (Breaking Change)
6+
7+
Previously, Taskless plugins were small Lua scripts that ran within a [wasmoon](https://github.com/ceifa/wasmoon) VM. Unfortunately, Lua VMs are [not](https://github.com/glejeune/ruby-lua) [consistent](https://github.com/Shopify/go-lua) [across](https://github.com/luaj/luaj) [languages](https://github.com/mlua-rs/rlua). This makes it impossible to gaurentee a plugin you (or we) write will work consistently across all platforms.
8+
9+
Using [Extism](https://extism.org/), we can move the runtime requirement out of the host and into the individual plugins. On a per-plugin basis, this increases the individual sizes significantly, but the tradeoffs are true universal compatibility and compatibility gaurentees via the Extism SDK. This lays the groundwork for much thinner client libraries in Python, PHP, Ruby, and .NET among others.
10+
11+
We're keeping the YAML format for plugins and configurations, as that's served us well. The biggest change is the module key that's now present, containing the wasm compiled plugin. Because wasm does not have host access, the security sandbox doesn't require any changes in order to support the new style.
12+
13+
If you'd like to use Lua plugins, please continue to use a previous version of the Taskless loader.

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Take control of your third-party API dependencies with deep, context-aware observability. The Taskless loader provides comprehensive monitoring and telemetry for your external service calls, capturing everything from basic HTTP metrics to service-specific error details that traditional APM tools miss.
44

55
Out of the box, you get:
6+
67
- Zero-config request & response monitoring
78
- Service-aware error detection beyond HTTP status codes
89
- Automatic correlation of API failures and root causes
@@ -48,6 +49,10 @@ TASKLESS_API_KEY="your api key" node --import="@taskless/loader" start.js
4849

4950
A programatic API is available by importing `taskless` from `@taskless/loader/core`. It's signature is `taskless(secret: string, options: Options):API`. We encourage you to explore the TypeScript types to see what's available.
5051

52+
# Writing Taskless Plugins
53+
54+
(coming soon)
55+
5156
# License
5257

5358
Apache 2.0

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"prepare": "husky",
1616
"prettier": "prettier",
1717
"syncpack": "syncpack",
18-
"test": "vitest",
18+
"test": "NODE_OPTIONS='--no-warnings' vitest",
1919
"xo": "xo"
2020
},
2121
"type": "module",
@@ -46,20 +46,19 @@
4646
"package.json"
4747
],
4848
"dependencies": {
49+
"@extism/extism": "2.0.0-rc9",
4950
"fets": "^0.8.2",
50-
"js-yaml": "^4.1.0",
5151
"msw": "^2.3.5",
5252
"ts-dedent": "^2.2.0",
5353
"uint8array-extras": "^1.4.0",
5454
"uuid": "^10.0.0",
55-
"wasmoon": "^1.16.0"
55+
"yaml": "^2.6.0"
5656
},
5757
"devDependencies": {
5858
"@changesets/cli": "^2.27.7",
5959
"@commitlint/cli": "^19.3.0",
6060
"@commitlint/config-conventional": "^19.2.2",
6161
"@hono/node-server": "^1.13.1",
62-
"@types/js-yaml": "^4.0.9",
6362
"@types/node": "^20.12.12",
6463
"@types/uuid": "^10.0.0",
6564
"execa": "^9.3.0",

0 commit comments

Comments
 (0)