Skip to content

Commit 9272a7b

Browse files
committed
fix: Spelling errors, add additional PAQ
1 parent dfc566c commit 9272a7b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rfcs/2024-05-19-on-demand-isolated-component.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For the purposes of reasoning about what may or may not be part of a component's
8383

8484
### Isolation
8585

86-
This techniques in this document are centered on making components out of [Wasm][wasm]. Therefor, when the term isolation is used, it mainly refers to the properties enabled by the Wasm runtime insofar as we may access it in a web browser. In a typical case, a Wasm module:
86+
The techniques in this document are centered on making components out of [Wasm][wasm]. Therefor, when the term isolation is used, it mainly refers to the properties enabled by the Wasm runtime insofar as we may access it in a web browser. In a typical case, a Wasm module:
8787

8888
- Will have its own, unshared buffer of memory
8989
- May only import objects, capabilities and metadata from "outside" the runtime when they are explicitly provided by its host
@@ -147,7 +147,7 @@ The response has `Content-Type: application/wasm` and the body is an octet strea
147147

148148
With the [Build Server](#build-server) in place - enabled by the [code transformation](#code-transformation) toolchains that are available today and maintained by the [Bytecode Alliance][bytecode-alliance] - we have the basic ingredients needed to assemble a low-friction workflow.
149149

150-
Web browsers do not currently support [Wasm Components][wasm-components]. Foretunately, Wasm Components can be expressed in terms of Core Wasm, so it is possible to polyfill support for Wasm Components in web browsers.
150+
Web browsers do not currently support [Wasm Components][wasm-components]. Fortunately, Wasm Components can be expressed in terms of Core Wasm, so it is possible to polyfill support for Wasm Components in web browsers.
151151

152152
The [js-component-bindgen] Rust crate provides an API for transforming any valid Wasm Component into browser-compatible Core Wasm, including corresponding TypeScript definitions and high-level JavaScript bindings that export the component's API (as described in its [WIT][wit] definition). Conveniently, the [js-component-bindgen] crate can also be compiled to Wasm and run in a web browser.
153153

@@ -165,7 +165,7 @@ The Service Worker intercepts `GET` requests to a well-known local path that is
165165
4. Make a request to [`POST /api/v0/component`](#post-apiv0component) on a running [Build Server](#build-server) using the prepared request body
166166
5. Make a request for the prepared [Wasm Component][wasm-components] using [`GET /api/v0/component/:id`](#get-apiv0componentid) on a running Build Server
167167
6. Invoke the [`transpile`][js-component-bindgen-transpile] API provided by [js-component-bindgen] and cache the returned files at the appropriate paths
168-
7. Create a wrapper ESM that imports the cached artifacts re-exports the component API
168+
7. Create a wrapper ESM that imports the cached artifacts and re-exports the component API
169169
8. Respond to the intercepted request with the generated wrapper module
170170

171171
## PAQ
@@ -180,6 +180,10 @@ Wasm Components in their raw form are portable. When we polyfill the component,
180180

181181
Additionally, once polyfilled the Wasm Component effectively consists of many files (the basic Hello World becomes 5 essential files, or 23 if you include all the TypeScript definition files). This makes them cumbersome to deliver as compared to a single Wasm Component.
182182

183+
**JavaScript Wasm Components inline a whole JS VM. Won't this take up a lot of space in cache?**
184+
185+
Yes. Each instance of the JS VM equals about 8MB of Wasm. There are strategies we might explore that may enable code-sharing under certain circumstances. But, for now this problem will remain unaddressed.
186+
183187
## Milestones
184188

185189
- Create the [Build Server](#build-server)

0 commit comments

Comments
 (0)