You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -328,14 +328,23 @@ In [`.github/workflows/web-host.yml`](./.github/workflows/web-host.yml), after t
328
328
329
329
To be sure that the preview server is up and running before running the tests, we use the [`webServer.command` option](https://playwright.dev/docs/test-webserver) of [playwright.config.ts](./packages/web-host/playwright.config.ts) to run `WAIT_FOR_SERVER_AT_URL=http://localhost:4173/webassembly-component-model-experiments/ npm run test:e2e:all:preview`
330
330
331
+
### plugins
331
332
332
-
### plugins (TypeScript)
333
+
There are currently plugins implemented in 3 languages (most of them are in rust):
333
334
334
-
You can write plugins in rust in [`crates/plugin-*`](./crates), you can also write plugins in TypeScript in [`packages/plugin-*`](./packages), thanks to `jco componentize` (based on [componentize-js](https://github.com/bytecodealliance/componentize-js)).
335
+
#### Rust
335
336
336
-
There is a [`packages/plugin-echo`](./packages/plugin-echo/) example plugin in TypeScript.
337
+
You can write plugins in rust in [`crates/plugin-*`](./crates).
337
338
338
-
The downsides of writing plugins in TypeScript is mostly that your `.wasm` file will be **much larger** than the one compiled from rust:
339
+
#### C
340
+
341
+
You can write plugins in C in [`c_modules/plugin-*`](./c_modules), thanks to `wit-bindgen` (based on [wit-bindgen](https://github.com/bytecodealliance/wit-bindgen)).
342
+
343
+
#### TypeScript
344
+
345
+
You can also write plugins in TypeScript in [`packages/plugin-*`](./packages), thanks to `jco componentize` (based on [componentize-js](https://github.com/bytecodealliance/componentize-js)).
346
+
347
+
The downsides of writing plugins in TypeScript is mostly that your `.wasm` file will be **much larger** than the one compiled from rust or C:
339
348
340
349
-~100KB of wasm for the rust plugin
341
350
- 11MB of wasm for the TypeScript plugin
@@ -344,9 +353,10 @@ The reason is that a JavaScript runtime needs to be embedded in the `.wasm` file
344
353
345
354
More about the [SpiderMonkey runtime embedding](https://github.com/bytecodealliance/ComponentizeJS?tab=readme-ov-file#explainer).
0 commit comments