Skip to content

Commit

Permalink
docs: fixup tranpsiling.md formattig
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Feb 8, 2024
1 parent ca5bb33 commit aced500
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/transpiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ These PRs can be implemented by extending the [default map configuration provide

> `shimpkg` in the above refers to a published npm package implementation to install per JS ecosystem conventions. This way, polyfill packages can be published to npm.
Upstreaming into the [@bytecodealliance/preview2-shim](https://github.com/bytecodealliance/jco/)[https://github.com/bytecodealliance/jco/tree/main/packages/preview2-shim] package is also possible for WASI proposals that have progressed to Phase 1 in the [WASI proposal stage process](https://github.com/WebAssembly/WASI/blob/main/Proposals.md).
Upstreaming into the [@bytecodealliance/preview2-shim](https://github.com/bytecodealliance/jco/tree/main/packages/preview2-shim) package is also possible for WASI proposals that have progressed to Phase 1 in the [WASI proposal stage process](https://github.com/WebAssembly/WASI/blob/main/Proposals.md).

## Instantiation

Expand All @@ -169,7 +169,7 @@ When using instantiation mode, the output is a JS module with a single `instanti

For async instantiation, the instantiate function takes the following signature:

```js
```ts
export async function instantiate(
getCoreModule: (path: string) => Promise<WebAssembly.Module>,
imports: {
Expand All @@ -185,15 +185,15 @@ export async function instantiate(

`getCoreModule` can typically be implemented as:

```js
```ts
export async function getCoreModule(path: string) {
return await WebAssembly.compile(await readFile(new URL(`./${path}`, import.meta.url)));
}
```

For synchronous instantiation, the instantiate function has the following signature:

```js
```ts
export function instantiate(
getCoreModule: (path: string) => WebAssembly.Module,
imports: {
Expand Down

0 comments on commit aced500

Please sign in to comment.